p:namespace-rename-016 (AB)

Test to make sure that a deleted namespace is handled correctly in a nested structure.

Test ab-namespace-rename-016.xml is expected to pass.

The pipeline


      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
         <p:input port="source"/>
         <p:output port="result"/>
            
         <p:filter select="//n:parent"/>
         <p:namespace-rename from="http://www.example.com/ns"/>
         
      </p:declare-step>
   
MorganaXProc passing XML Calabash failing

Inputs

port = source


      <doc xmlns="http://www.example.com/">
         <parent>
            <ns:child xmlns:ns="http://www.example.com/ns"/>
         </parent>
      </doc>   

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="*/local-name()='parent'">Root element is not 'parent'.</s:assert>
               <s:assert test="*/namespace-uri()='http://www.example.com/'">Root element's namespace is not 'http://www.example.com/'.</s:assert>
               <s:assert test="*/*/local-name()='child'">Name of root's child is not 'child'.</s:assert>
               <s:assert test="*/*/namespace-uri()=''">Element 'child' is not in no-namespace.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

17 May 2019, Achim Berndzen

Ported tests for p:namespace-rename