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

Pass xsl:include in Schematron through to the compiled stylesheet #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vincentml
Copy link
Member

This change allows using xsl:include in a Schematron to include an XSLT file. This currently works in oXygen 19.1 but does not work in the Schematron Skeleton XSLTs. A use case for this is to import an XSLT that contains a library of custom functions. It is currently possible to include xsl:function definitions in a Schematron though only in the main Schematron file, so this change allows for better organization and reusability.

<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
    <sch:ns uri="function-library" prefix="lib"/>
    <xsl:include href="function-library.xsl"/>
    <sch:pattern>
        <sch:rule context="example">
            <sch:assert test="lib:check(.)">custom function check</sch:assert>
        </sch:rule>
    </sch:pattern>
</sch:schema>

@vincentml
Copy link
Member Author

vincentml commented Dec 15, 2017

The new sch:extends[@href] element might accomplish the same goal. I will have to try this possibly better alternative.

@tgraham-antenna tgraham-antenna added enhancement review wanted Needs review before acceptance labels Mar 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement review wanted Needs review before acceptance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants