ab-validate-with-schematron-012

Testing schematron validation: Invalid doc trigger error in report.

Test ab-validate-with-schematron-012.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"/>
  
  <p:validate-with-schematron phase="full" assert-valid="false">
    <p:with-input port="source" href="../documents/docbook-invalid.xml"/>
    <p:with-input port="schema" href="../documents/docbook-phases.sch"/>
  </p:validate-with-schematron>
  
  <p:count limit="1">
    <p:with-input pipe="report" select="//xvrl:report"/>
  </p:count>
</p:declare-step>
MorganaXProc passing XML Calabash failing

Schematron validation


    <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
      <s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
      <s:pattern>
        <s:rule context="/">
          <s:assert test="c:result">Document element is not 'c:result'.</s:assert>
          <s:assert test="c:result/text() != '0'">Text child should not be '0'.</s:assert>
        </s:rule>
      </s:pattern>
    </s:schema>
  

Revision history

18 Aug 2019, Achim Berndzen

Initial publication: Test ported from 1.0 test suite