ab-validate-with-schematron-013
Testing schematron validation: report should be child of c:error.
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:try>
<p:validate-with-schematron report-format="xvrl">
<p:with-input port="source"
href="../documents/docbook-invalid.xml"/>
<p:with-input port="schema"
href="../documents/docbook.sch"/>
</p:validate-with-schematron>
<p:catch xmlns:err="http://www.w3.org/ns/xproc-error"
code="err:XC0054">
<p:count limit="1">
<p:with-input xmlns:xvrl="http://www.xproc.org/ns/xvrl"
select="//xvrl:report"/>
</p:count>
</p:catch>
</p:try>
</p:declare-step>
Result
<c:result xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:t="http://xproc.org/ns/testsuite/3.0">1</c:result>
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: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
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 03 Jan 2020, Achim Berndzen
- Added explicit request for xvrl because svrl is default now.
- 18 Aug 2019, Achim Berndzen
- Initial publication: Test ported from 1.0 test suite