<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/ab-validate-with-schematron-004.xml"
        name="ab-validate-with-schematron-004.xml"
        expected="pass"
        features="p-validate-with-schematron">
   <t:info>
      <t:title>ab-validate-with-schematron-004</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2021-06-10</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Added attribute 'queryBinding' to schematron's schema.</p>
            </t:description>
         </t:revision>
         <t:revision>
            <t:date>2019-08-18</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Initial publication: Test ported from 1.0 test suite</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml">
      <p>Testing schematron validation: Test phase</p>
   </t:description>
   <t: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="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>
   </t:pipeline>
   <t:schematron>
      <s:schema xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://purl.oclc.org/dsdl/schematron"
                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>
   </t:schematron>
   <t:result name="ab-validate-with-schematron-004.xml">
      <book xmlns="http://docbook.org/ns/docbook"
            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>
   </t:result>
</t:test>
