Project

Profile

Help

Question about text value template in XSLT 3

Added by Martin Honnen over 5 years ago

When using Saxon 9.9.1.2 HE to try to run an XSLT stylesheet using expand-text="yes" and text value templates containing backtick characters in the form

    <xsl:template match="foo">`{.}`</xsl:template>

Saxon gives me an error "XPST0003: Unclosed string template in expression".

I have tried to find a reason for that error message in the XSLT 3 and XPath 3.1 spec but I am struggling to find any section giving special meaning or using a backtick as part of the expression syntax that would explain me Saxon's error message.


Replies (1)

RE: Question about text value template in XSLT 3 - Added by Michael Kay over 5 years ago

Thanks for reporting it. It's caused by an interaction with "String Constructors" in XQuery [ §3.10 - https://www.w3.org/TR/xquery-31/#doc-xquery31-StringConstructor ]. Saxon uses the same tokenizer for XPath and XQuery (and XSLT value templates) and it's failing to recognize the closing brace when followed by a backtick.

    (1-1/1)

    Please register to reply