xsl:include/@href sometimes incorrect in output of schematronDispatcher.xsl

This should cover W3C XML Schema, Relax NG and DTD related problems.
dcramer
Posts: 147

xsl:include/@href sometimes incorrect in output of schematronDispatcher.xsl

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:

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>   
tavy
Posts: 141

Re: xsl:include/@href sometimes incorrect in output of schematronDispatcher.xsl

Wed May 02, 2018 11:42 am

Hello,

Thanks for the feedback.
The "schematronDispatcher.xsl" is used resolve the Schematron "sch:include" and "sch:extends". The "xsl:include" it is copied in the complied file verbatim with the rest of the XSLT code from Schematron. Adding "xsl:include" in the Schematron file is not something that is in the Schematron specification. It works because oXygen implementation is XSLT-based.

Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests