p:escape-markup 002

Tests p:escape-markup

Test ab-escape-markup-002.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>
                  <body-wrapper xmlns=""><doc><p>foo&bar;</p></doc></body-wrapper>
               </p:inline>
            </p:with-input>
         </p:escape-markup>
         
         <p:wrap-sequence wrapper="wrapper"/>
      </p:declare-step>
   
MorganaXProc passing XML Calabash passing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:pattern>
             <s:rule context="/">
                <s:assert test="wrapper">Document element is not wrapper.</s:assert>
                <s:assert test="wrapper/body-wrapper/text()='<doc><p>foo&amp;bar;</p></doc>'">Text child is not '<doc><p>foo&amp;bar;</p></doc>'.</s:assert>
              </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

23 Jun 2019, Achim Berndzen

Tests for p:escape-markup