parse-html using Saxon-12 in Oxygen XML
Posted: Tue Nov 19, 2024 1:58 pm
Hi,
I don't currently now how to run saxon:parse-html (https://www.saxonica.com/documentation1 ... parse-html) in the context of Oxygen XML 26.1 and xslt transformations.
I have tried the following code in a transformation scenario and in the debug mode, while trying to add three different jars:
1. the one suggested downloaded in the slack thread on xml.com (https://xmlcom.slack.com/archives/C011N ... 8858490299) : from http://validator.nu/
2. Using the download from maven repository https://mvnrepository.com/artifact/nu.v ... parser/1.4
3. Adding the patched html parser in Oxygen lib
<code>
<xsl:template name="xsl:initial-template">
<xsl:sequence select="saxon:parse-html('<html><p>test</p></html>')"/>
</xsl:template>
</code>
I get an error in the UI looking like:
Ps, I also tried to run the new fn:parse-html with xslt version set to 4.0, unsuccessfully (but gave same error message) . This requires setting allowSyntaxExtensions to true. This can currently be done from supplying a simple saxon config.xml, but a similar checkbox to allowing extension functions would be convenient.
Best ragards,
Øyvind
I don't currently now how to run saxon:parse-html (https://www.saxonica.com/documentation1 ... parse-html) in the context of Oxygen XML 26.1 and xslt transformations.
I have tried the following code in a transformation scenario and in the debug mode, while trying to add three different jars:
1. the one suggested downloaded in the slack thread on xml.com (https://xmlcom.slack.com/archives/C011N ... 8858490299) : from http://validator.nu/
2. Using the download from maven repository https://mvnrepository.com/artifact/nu.v ... parser/1.4
3. Adding the patched html parser in Oxygen lib
<code>
<xsl:template name="xsl:initial-template">
<xsl:sequence select="saxon:parse-html('<html><p>test</p></html>')"/>
</xsl:template>
</code>
I get an error in the UI looking like:
Martin Holmes in the slack thread mentioned that it might be a conflict with dependencies used in Oxygen, so I was wondering if it currently is possible, or if there is a bug. Saxon 12 reimplemented parse-html and now uses nu.validator instead of tagsoup, which was dropped in and that I believe worked in earlier Oxygen XML Editors. I believe I have dropped cowan jar successfully into previous versions of Oxygen, using Saxon < 12, to run the extension function.E nu/validator/htmlparser/sax/HtmlParser
Ps, I also tried to run the new fn:parse-html with xslt version set to 4.0, unsuccessfully (but gave same error message) . This requires setting allowSyntaxExtensions to true. This can currently be done from supplying a simple saxon config.xml, but a similar checkbox to allowing extension functions would be convenient.
Best ragards,
Øyvind