XPath version in XSLT 3.0? Weird regex error
Posted: Sat Sep 14, 2024 9:16 pm
Hi.
I need to use various Unicode RegEx classes such as in my XSLT scripts. I can test them in Oxygen's XPath builder and they work as expected with XPath 2.0 and XPath 3.1.
But when I put the same RegEx class inside an XSLT stylesheet (version 3.0), transforming with Saxon, for instance:
I'm getting an this error:
with additional info pointing to http://www.w3.org/TR/2005/WD-xpath-func ... RRFORX0002 which seems to indicate some kind of XPath incompatibility. But that doesn't make much sense to me because XSLT 3.0 should be ok with XPath 3.1 and, as I said, this definitely works in Oxygen's XPath builder.
What am I missing here? I'll be most grateful for any tips you may have.
All best,
Toma
I need to use various Unicode RegEx classes such as
Code: Select all
\p{P}
But when I put the same RegEx class inside an XSLT stylesheet (version 3.0), transforming with Saxon, for instance:
Code: Select all
<xsl:template match="P/B[1][matches(., '\p{P}\s*$')]">
</xsl:template>
Code: Select all
Syntax error at char 8 in regular expression: Expected '{' after \112
What am I missing here? I'll be most grateful for any tips you may have.
All best,
Toma