ab-validate-with-schematron-004
Testing schematron validation: Test phase
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 phase="no-biblioref-checking">
<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:declare-step>
Result
<book xmlns="http://docbook.org/ns/docbook"
xmlns:t="http://xproc.org/ns/testsuite/3.0" xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0">
<title>Invalid Book</title>
<chapter xml:id="ch1">
<title>XML?</title>
<para>This is a story about <biblioref linkend="xml10"/> and
<biblioref linkend="xml11"/>. We explicitly and erroneously point
to this chapter with biblioref: <biblioref linkend="ch1"/>.</para>
</chapter>
<bibliography>
<bibliomixed xml:id="xml10">
<abbrev>XML 1.0</abbrev>
<citetitle xlink:href="http://www.w3.org/TR/REC-xml/">Extensible
Markup Language (XML) 1.0 (Fourth Edition)</citetitle>. Tim Bray,
Jean Paoli, C. M. Sperberg-McQueen, et. al.
editors. W3C Recommendation 16 August 2006.</bibliomixed>
<bibliomixed xml:id="xmlns10">
<abbrev>Namespaces 1.0</abbrev>
<citetitle xlink:href="http://www.w3.org/TR/REC-xml-names/">Namespaces
in XML 1.0 (Second Edition)</citetitle>. Tim Bray,
Dave Hollander, Andrew Layman, et. al.,
editors. W3C Recommendation 16 August 2006.</bibliomixed>
<bibliomixed xml:id="xml11">
<abbrev>XML 1.1</abbrev>
<citetitle xlink:href="http://www.w3.org/TR/xml11/">Extensible
Markup Language (XML) 1.1 (Second Edition)</citetitle>. Tim Bray,
Jean Paoli, C. M. Sperberg-McQueen, et. al.
editors. W3C Recommendation 16 August 2006.</bibliomixed>
<bibliomixed xml:id="xmlns11">
<abbrev>Namespaces 1.1</abbrev>
<citetitle xlink:href="http://www.w3.org/TR/xml-names11/">Namespaces
in XML 1.1 (Second Edition)</citetitle>. Tim Bray,
Dave Hollander, Andrew Layman, et. al.,
editors. W3C Recommendation 16 August 2006.</bibliomixed>
</bibliography>
</book>
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="deep-equal(., doc('../documents/docbook-invalid.xml'))">The document is not equal to the source document.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 18 Aug 2019, Achim Berndzen
- Initial publication: Test ported from 1.0 test suite