p:escape-markup 005

Tests p:escape-markup: Tests document properties are preserved.

Test ab-escape-markup-005.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:escape-markup>
            <p:with-input>
               <p:inline document-properties="map{'base-uri': 'http://example.test',                                                       'additional': 'add'}">
                  
                  
                  <body-wrapper xmlns=""><doc/></body-wrapper>
                  
                  
               </p:inline>
            </p:with-input>
         </p:escape-markup>
         
        <p:identity>
           <p:with-input select="p:document-properties-document(.)"/>
        </p:identity>
      </p:declare-step>
   
MorganaXProc passing XML Calabash passing

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:escape-markup