I am trying to compile Schematron file through the XSLT file (iso_svrl_for_xslt2.xsl) with help of Saxon9HE as described here and there.
Here I am calling Saxon with 3 arguments:
-o:schema-compiled.xsl is the output file (XSLT script)
-s:example_schematron.xsl is the source file
iso-schematron-xslt2/iso_svrl_for_xslt2.xsl is the stylesheet file, used to compile schematron file into XSLT script
java -jar saxon9he.jar -o:schema-compiled.xsl -s:example_schematron.sch iso-schematron-xslt2/iso_svrl_for_xslt2.xsl
Here are the files:
example_schematron.sch:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.ascc.net/xml/schematron">
<title>Test Schematron</title>
<pattern name="My rules">
<rule context="User">
<assert test="count(email) != 1">
User shall have exactly one email
</assert>
</rule>
</pattern>
</schema>
schema-compiled.xsl:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Why am I getting empty schema-compiled.xsl?
http://purl.oclc.org/dsdl/schematron
had to be changed tohttp://www.ascc.net/xml/schematron
. Silly me. – Liederkranz