<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/ab-load-010.xml"
        name="ab-load-010.xml"
        expected="pass"
        features="webaccess">
   <t:info>
      <t:title>load 010 (AB)</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2025-05-23</t:date>
            <t:author>
               <t:name>Norm Tovey-Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Added static options for web server host and port.</p>
            </t:description>
         </t:revision>
         <t:revision>
            <t:date>2024-10-14</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Initial check in</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml">
      <p>Testing p:load: Redirects must be followed.</p>
   </t:description>
   <t:pipeline>
      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
         <p:option name="WHOST" select="'http://localhost:8246'" static="true"/>
         <p:output port="result"/>
         <p:load href="{$WHOST}/service/this-is-a"/>
      </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="doc">The document root is not 'doc'.</s:assert>
               <s:assert test="doc/location">Document does not have a child element named 'location'</s:assert>
               <s:assert test="doc/location/text()='This is d'">The text in element 'location' is not right.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="ab-load-010.xml">
      <doc>
         <location>This is d</location>
         <a-goes-to/>
         <b-goes-to/>
         <c-goes-to/>
      </doc>
   </t:result>
</t:test>
