<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="ab-load-006.xml"
        name="ab-load-006.xml"
        expected="pass">
   <t:info>
      <t:title>load 006 (AB)</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-12-21</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Ported test for p:load 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 p:load</p>
   </t:description>
   <t:pipeline>
      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
         <p:output port="result"/>
         <p:load href="../documents/address-valid-sample.xml"
                 parameters="map{'dtd-validate' : false()}"/>
      </p:declare-step>
   </t:pipeline>
   <t:schematron>
      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="address">The document root is not address.</s:assert>
               <s:assert test="address/first/text()='Jon'">Document does not have a first element with 'Jon'</s:assert>
               <s:assert test="address/last/text()='Tester'">Document does not have a last element with 'Tester'</s:assert>
               <s:assert test="address/phone/text()='5555555555'">Document does not have a phone element with '5555555555'</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="ab-load-006.xml">
      <address>
         <first>Jon</first>
         <last>Tester</last>
         <phone>5555555555</phone>
      </address>
   </t:result>
</t:test>
