p:set-properties-035 (AB)

Tests p:set-properties removes base-uri properly

Test ab-set-properties-035.xml is expected to pass.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" 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>
MorganaXProc passing XML Calabash passing

Schematron validation


<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="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