p:set-properties-035 (AB)
Tests p:set-properties removes base-uri properly
Test is expected to pass.
The pipeline
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
<p:output port="result"/>
<p:set-properties properties="map{}" merge="false">
<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>
Result
<result xmlns:t="http://xproc.org/ns/testsuite/3.0">
<root-uri/>
<element-uri/>
<element-with-xml-base>http://me-string</element-with-xml-base>
<document-prop/>
</result>
Schematron checks
<s:schema xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
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="empty(result/root-uri/text())">The base-uri of root is not right.</s:assert>
<s:assert test="empty(result/element-uri/text())">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="empty(result/document-prop/text())">The base-uri document-property is not right.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 01 Feb 2023, Achim Berndzen
- Test for base-uri in p:set-properties