Compiled Schematron

The Schematron Schema is compiled into an XSLT using a customized version of the Schematron skeleton implementation [10]. The sekeleton implementation needed to be adjusted for two reasons:

  1. We also wanted to use attributes as rule context.[11]

  2. We wanted to provide a more human readable version of the location where the error occurs.

Given the the following XML file…

    <name>Jane Grant</name>

…the target output of the compiled Schematron XSLT is an XML document that follows the structure of the Schematron Validation Report Language. A failed Schematron assert would result in the following SVRL:

  test="$bag-weight le 8"
     The weight of cabin luggage is 8kg or less.
       The cabin luggage of Jane Grant exceeded 
       the maximum weight allowance by 3kg. 
       Pack lighter!

The reference to the documentation of the constraint in the constraint.xml is kept in a @see attribute.

[10] see

[11] see also the discussion on issues and and pull request