<?xml-stylesheet type="text/xsl" href="/style/testcase.xsl"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite"
        xmlns:p="http://www.w3.org/ns/xproc"
        xmlns:c="http://www.w3.org/ns/xproc-step"
        xmlns:err="http://www.w3.org/ns/xproc-error">

<t:title>Test make-absolute-uris #001</t:title>

<t:pipeline>
<p:declare-step version='1.0' name="main"
	    xmlns:p="http://www.w3.org/ns/xproc"
	    xmlns:ex="http://xproc.org/ns/xproc/ex">
  <p:input port="source">
    <p:document href="../doc/xml-base-test.xml"/>
  </p:input>
  <p:output port="result"/>

  <p:make-absolute-uris match="uri">
    <p:input port="source">
      <p:pipe step="main" port="source"/>
    </p:input>
  </p:make-absolute-uris>
</p:declare-step>
</t:pipeline>

<t:output port='result'>
<doc>
<p>This has one base URI: <uri>http://tests.xproc.org/tests/doc/xml-base-test.xml</uri></p>
<?pi in base-test?>
<div>
<p>This has a different base URI: <uri>http://tests.xproc.org/tests/doc/xml-base-chap.xml</uri>.</p>
<?pi in base-chap?>
</div>

<p>This has the original base URI.</p>
</doc>
</t:output>

</t:test>

