Schematron / schematron

Schematron "skeleton" - XSLT implementation
MIT License
93 stars 45 forks source link

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

Open octavianN opened 7 years ago

octavianN commented 7 years ago

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:

in

</xsl:if>