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:wrap-sequence wrapper="wrapper"/>
MorganaXProc passing XML Calabash passing

Schematron validation

      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
            <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>

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.