Jenkins job set up; schema and validation build reworked
Posted by mholmes on 07 Dec 2018 in Activity log
In preparation for Endings-izing this project, I've set up a Jenkins build job, and reworked the schema build and the validation process completely, following the model of DVPP. In the process I discovered a useful thing worth documenting. I had a Schematron rule which required the reading of an XML file, whose location was specified relative to the ODD file/RNG file location. However, when compiled Schematron was created elsewhere, this didn't work. Therefore I rewrote the rule so that it resolves a relative URI against the context file, like this:
<constraintSpec ident="biblCorrespPointsToBibl" scheme="schematron">
<constraint>
<sch:rule context="tei:bibl[@corresp]">
<sch:let name="biblId" value="substring-after(@corresp, 'bibl:')"/>
<sch:assert test="doc(resolve-uri('../biblio/biblio.xml', base-uri(.)))//tei:bibl[@xml:id=$biblId]">
ERROR: The @corresp value should point to the @xml:id of a bibl element
in the biblio.xml file (<sch:value-of select="$biblId"/>).
</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>