p:unescape-markup 008 (AB)

Tests p:unescape-markup: Document properties are preserved.

Test ab-unescape-markup-008.xml is expected to pass.

The pipeline


      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0">
         <p:output port="result"/>
         <p:unescape-markup namespace="http://www.example.org/ns/">
            <p:with-input port="source">
               <p:inline document-properties="map{'base-uri': 'http://example.test',                   'additional': 'add'}">
                  <wrapper xmlns=""><!-- comment --><?foo bar?><doc><p>foo</p></doc></wrapper>
               </p:inline>
            </p:with-input>
         </p:unescape-markup>
         
         <p:identity>
            <p:with-input select="p:document-properties-document(.)"/>
         </p:identity>
      </p:declare-step>
   
MorganaXProc passing XML Calabash failing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="c:document-properties">Root element is not 'document-properties'.</s:assert>
               <s:assert test="c:document-properties/content-type='application/xml'">Property 'content-type' is not 'application/xml'.</s:assert>
               <s:assert test="c:document-properties/additional='add'">Property 'additional' is not 'add'.</s:assert>
               <s:assert test="c:document-properties/base-uri='http://example.test'">Property 'base-uri' is not 'http://example.test'.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

23 Jun 2019, Achim Berndzen

Tests for p:unescape-markup