validate-sch-001
Copying a 3.0 test; checking that the digests roll up.
Test is expected to pass.
The pipeline
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" name="pipeline" version="3.0">
<p:output port="result" pipe="report"/>
<p:validate-with-schematron report-format="xvrl"
assert-valid="false" phase="full">
<p:with-input port="source"
href="../documents/docbook-invalid.xml"/>
<p:with-input port="schema"
href="../../../3.0-test-suite/test-suite/documents/docbook-phases.sch"/>
</p:validate-with-schematron>
</p:declare-step>
Result
<xvrl:report xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:xvrl="http://www.xproc.org/ns/xvrl">
<xvrl:metadata>
<xvrl:timestamp>2025-06-19T18:02:48.339982340Z</xvrl:timestamp>
<xvrl:validator name="SchXslt2" version="unknown"/>
<xvrl:document href="file:/woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/extra-suite/test-suite/documents/docbook-invalid.xml"/>
<xvrl:schema schematypens="http://purl.oclc.org/dsdl/schematron"/>
<xvrl:schema href="file:/woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/3.0-test-suite/test-suite/documents/docbook-phases.sch"
schematypens="http://purl.oclc.org/dsdl/schematron" language="Schematron"/>
</xvrl:metadata>
<xvrl:detection severity="error">
<xvrl:location xpath="/Q{http://docbook.org/ns/docbook}book[1]"/>
<xvrl:message>The root element must have a version attribute.</xvrl:message>
<xvrl:context>
<xvrl:location xpath="/db:book"/>
</xvrl:context>
</xvrl:detection>
<xvrl:detection severity="error">
<xvrl:location xpath="/Q{http://docbook.org/ns/docbook}book[1]/Q{http://docbook.org/ns/docbook}chapter[1]/Q{http://docbook.org/ns/docbook}para[1]/Q{http://docbook.org/ns/docbook}biblioref[3]"/>
<xvrl:message>@linkend on biblioref must point to a bibliography entry.</xvrl:message>
<xvrl:context>
<xvrl:location xpath="db:biblioref[@linkend]"/>
</xvrl:context>
</xvrl:detection>
<xvrl:digest valid="false" fatal-error-count="0"
error-count="2" warning-count="0" info-count="0"
unspecified-count="0" fatal-error-codes="" error-codes=""
warning-codes="" info-codes="" unspecified-codes=""
worst="error"/>
</xvrl:report>
Schematron checks
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:t="http://xproc.org/ns/testsuite/3.0" queryBinding="xslt2">
<s:ns prefix="xvrl"
uri="http://www.xproc.org/ns/xvrl"/>
<s:pattern>
<s:rule context="/">
<s:assert test="xvrl:report">The root is wrong.</s:assert>
<s:assert test="xvrl:report/xvrl:digest/@error-count = '2'">The error count is wrong.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 07 Feb 2025, Norm Tovey-Walsh
- Initial commit.