Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

The "document-uri" variable is invalid for "xslt1" query binding #47

Open
octavianN opened this issue May 3, 2017 · 0 comments
Open
Labels
bug Description of a bug

Comments

@octavianN
Copy link

octavianN commented May 3, 2017

In the iso_schematron_skeleton_for_saxon.xsl the value of the document-uri variable is <axsl:value-of select="document-uri(/)" />.
But if you create a Schematron file with the query binding set to "xslt1", and compile it using iso_schematron_skeleton_for_saxon.xsl styleseet, the file will not be valid because the document-uri() function is not available in XSLT1.

I propose a modification in the iso_schematron_skeleton_for_saxon.xsl styleseet, to generate the value of the document-uri variable only if is not XSLT1 query binding.
Change this line from iso_schematron_skeleton_for_saxon.xsl styleseet:

<axsl:variable name="document-uri"><axsl:value-of select="document-uri(/)" /></axsl:variable>

in

<xsl:if test="@queryBinding and translate(@queryBinding, 'XSLT', 'xslt')!='xslt'
and translate(@queryBinding, 'XSLT', 'xslt')!='xslt1' and @queryBinding!='xpath'">
<axsl:value-of select="document-uri(/)" />
</xsl:if>

octavianN added a commit to oxygenxml/schematron that referenced this issue May 3, 2017
@tgraham-antenna tgraham-antenna added the bug Description of a bug label Feb 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Description of a bug
Projects
None yet
Development

No branches or pull requests

2 participants