<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/basex-href-001.xml"
        name="basex-href-001.xml"
        expected="pass"
        features="basex-collector">
   <t:info>
      <t:title>basex-href-001</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2025-10-29</t:date>
            <t:author>
               <t:name>Norm Tovey-Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Created test.</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml">
      <p>Tests that a BaseX URI can be resolved by the document resolver.</p>
   </t:description>
   <t:file-environment>
      <t:file path="file.xml">&lt;doc&gt;It worked.&lt;/doc&gt;</t:file>
   </t:file-environment>
   <t:pipeline>
      <p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions"
                      xmlns:p="http://www.w3.org/ns/xproc"
                      name="main"
                      version="3.0">
         <p:output port="result" sequence="true"/>
         <p:identity>
            <p:with-input href="basex://XProcUnitTestDB/testfolder/file.xml"/>
         </p:identity>
      </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 = 'It worked.'">The result is wrong.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="basex-href-001.xml">
      <doc>It worked.</doc>
   </t:result>
</t:test>
