<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/ab-wrap-010.xml"
        name="ab-wrap-010.xml"
        expected="pass">
   <t:info>
      <t:title>p:wrap 010 (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-08-25</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Tests for p:wrap (Partly ported from 1.0)</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml">
      <p>Tests p:wrap</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:wrap match="element" wrapper="Q{{http://baz.com}}wrapper">
            <p:with-input>
               <document>
                  <element/>
               </document>
            </p:with-input>
         </p:wrap>
      </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:ns prefix="baz" uri="http://baz.com"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="document">Root element is not 'document'.</s:assert>
               <s:assert test="document/baz:wrapper">Element 'document' does not have a child 'baz:wrapper'.</s:assert>
               <s:assert test="document/baz:wrapper/element">Element 'baz:wrapper' does not have child 'element'.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="ab-wrap-010.xml">
      <document>
         <wrapper xmlns="http://baz.com">
            <element xmlns=""/>
         </wrapper>
      </document>
   </t:result>
</t:test>
