Tests that relative URI resolution is dependent on the XProc version attribute. (These tests should also be in the official test suite, but this is a temporary place holder. Also, I stole it from Achim. 🙂)
Test relative-anyuri-001.xml is expected to pass.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:test="http://example.com/test" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="main" version="3.1">
<p:output port="result"/>
<p:option name="uri" select="'somewhere.txt'"/>
<p:declare-step type="test:step">
<p:output port="result"/>
<p:option name="uri1" required="true" as="xs:anyURI"/>
<p:option name="uri2" required="true" as="xs:anyURI"/>
<p:option name="uri3" required="true" as="xs:anyURI"/>
<p:identity>
<p:with-input>
<doc>
<uri1>{$uri1}</uri1>
<uri2>{$uri2}</uri2>
<uri3>{$uri3}</uri3>
</doc>
</p:with-input>
</p:identity>
</p:declare-step>
<test:step uri2="{$uri}" xml:base="http://step" uri3="somewhere-else.xpl">
<p:with-option name="uri1" select="$uri" xml:base="http://with-option"/>
</test:step>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:pattern>
<s:rule context="/">
<s:assert test="doc">The root is wrong.</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="/doc">
<s:assert test="uri1 = 'http://step/somewhere.txt'">Wrong uri1</s:assert>
<s:assert test="uri2 = 'http://step/somewhere.txt'">Wrong uri2</s:assert>
<s:assert test="uri3 = 'somewhere-else.xpl'">Wrong uri3</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.