Tests p:set-properties changes base-uri
Test ab-set-properties-034.xml is expected to pass.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:set-properties properties="map{'base-uri': 'file:///something'}">
<p:with-input>
<doc>
<element xml:base="http://me-string"/>
</doc>
</p:with-input>
</p:set-properties>
<p:identity>
<p:with-input>
<result>
<root-uri>{base-uri(/)}</root-uri>
<element-uri>{base-uri(/*)}</element-uri>
<element-with-xml-base>{base-uri(doc/element)}</element-with-xml-base>
<document-prop>{p:document-property(., 'base-uri')}</document-prop>
</result>
</p:with-input>
</p:identity>
</p:declare-step>
<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns uri="http://www.w3.org/2005/xpath-functions" prefix="j"/>
<s:pattern>
<s:rule context="/">
<s:assert test="result">Root element is not 'result'.</s:assert>
<s:assert test="result/root-uri/text()='file:///something'">The base-uri of root is not right.</s:assert>
<s:assert test="result/element-uri/text()='file:///something'">The element-uri of root is not right.</s:assert>
<s:assert test="result/element-with-xml-base/text()='http://me-string'">The base-uri of element with xml:base is not right.</s:assert>
<s:assert test="result/document-prop/text()='file:///something'">The base-uri document-property is not right.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Test for base-uri in p:set-properties