<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/nw-base-uri-001.xml"
        name="nw-base-uri-001.xml"
        expected="pass">
   <t:info>
      <t:title>nw-base-uri-001</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2026-06-28</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>Test that the result of p:archive has no base URI.</p>
   </t:description>
   <t:pipeline>
      <p:declare-step xmlns:c="http://www.w3.org/ns/xproc-step"
                      xmlns:p="http://www.w3.org/ns/xproc"
                      version="3.0">
         <p:output port="result"/>
         <p:archive>
            <p:with-input port="source">
               <p:inline document-properties="map{'base-uri' : 'http://test/one.xml'}">
                  <one/>
               </p:inline>
               <p:inline document-properties="map{'base-uri' : 'http://test/two.xml'}">
                  <two/>
               </p:inline>
            </p:with-input>
            <p:with-input port="manifest">
               <c:archive>
                  <c:entry name="one.xml"
                           href="http://test/one.xml"
                           comment="This is doc one."/>
                  <c:entry name="two.xml"
                           href="http://test/two.xml"
                           comment="This is doc two."/>
               </c:archive>
            </p:with-input>
            <p:with-input port="archive">
               <p:empty/>
            </p:with-input>
         </p:archive>
         <p:cast-content-type content-type="application/xml">
            <p:with-input select="p:document-properties(/)"/>
         </p:cast-content-type>
      </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="fn" uri="http://www.w3.org/2005/xpath-functions"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="fn:map">Document element is wrong</s:assert>
            </s:rule>
         </s:pattern>
         <s:pattern>
            <s:rule context="/fn:map">
               <s:assert test="not(exists(*[@key='base-uri']))">There should be no base-uri property</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="nw-base-uri-001.xml">
      <map xmlns="http://www.w3.org/2005/xpath-functions">
         <string key="content-type">application/zip</string>
      </map>
   </t:result>
</t:test>
