validate-sch-001

Copying a 3.0 test; checking that the digests roll up.

Test validate-sch-001.xml is expected to pass.

It requires the following features: p-validate-with-schematron.

The pipeline

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" 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>

Schematron validation

<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" 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.