Features: p-validate-with-schematron

ab-validate-with-schematron-016

Testing that XC0054 is raised if documents is not valid.

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"/>
   <p:validate-with-schematron>
      <p:with-input port="source">
         <doc/>
      </p:with-input>
      <p:with-input port="schema">
         <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                     queryBinding="xslt2">
            <sch:pattern>
               <sch:rule context="/">
                  <sch:report test="false()">Text</sch:report>
               </sch:rule>
            </sch:pattern>
         </sch:schema>
      </p:with-input>
   </p:validate-with-schematron>
</p:declare-step>

Result

<doc xmlns:t="http://xproc.org/ns/testsuite/3.0"/>

Schematron checks

<s:schema xmlns="http://www.w3.org/1999/xhtml"
          xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
          queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="doc">Document element is not 'doc'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

01 Feb 2022, Achim Berndzen
Initial commit