xsl:include/@href sometimes incorrect in output of schematronDispatcher.xsl
Posted: Wed May 02, 2018 1:00 am
This is an edge case, but I thought I'd mention it:
When I run frameworks/schematron/impl/schematronDispatcher.xsl against a schematron file that contains xsl:include elements, relative paths in the href attributes on the xsl:include elements are only correct if the result document happens to be in the same directory as the original schematron.
For example, say I have the following schematron that uses sch:extends. In the schematron that we're extending, there are xsl:include elements with paths that are relative to cals.sch. In the result of schematronDispatcher.xsl, the xsl:include/@href values will not be correct because they are copied verbatim from cals.sch:
When I run frameworks/schematron/impl/schematronDispatcher.xsl against a schematron file that contains xsl:include elements, relative paths in the href attributes on the xsl:include elements are only correct if the result document happens to be in the same directory as the original schematron.
For example, say I have the following schematron that uses sch:extends. In the schematron that we're extending, there are xsl:include elements with paths that are relative to cals.sch. In the result of schematronDispatcher.xsl, the xsl:include/@href values will not be correct because they are copied verbatim from cals.sch:
Code: Select all
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" queryBinding="xslt2"
xmlns:sqf="http://www.schematron-quickfix.com/validator/process">
<xsl:include href="../xsl/transclusion-fixup.xsl"/>
<sch:extends href="../third-party-tools/cals-table-schematron/source/cals.sch"/>
<!-- Other stuff -->
</sch:schema>