p:escape-markup 007

Tests p:escape-markup: More than one top-level element is an error.

Test ab-escape-markup-007.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/>
            </p:with-input>
         </p:escape-markup>
         <p:wrap-sequence wrapper="wrapper"/>
      </p:declare-step>
   
MorganaXProc passing XML Calabash failing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="wrapper">Root element is not 'wrapper'.</s:assert>
               <s:assert test="count(wrapper/node())=1">Root element should have just one child.</s:assert>
               <s:assert test="wrapper/comment()=' comment '">Comment is not ' comment '.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

30 Jun 2019, Achim Berndzen

Fixed test by removing whitespace around comment.

23 Jun 2019, Achim Berndzen

Tests for p:escape-markup: No top-level element means no change.