p:wrap-sequence 016

Testing the new (in 3.1) attributes option on p:wrap-sequence

Test ab-wrap-sequence-016.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="sequence" attributes="map{'seq': true()}">
      <p:with-input>
         <doc/>
         <doc/>
         <doc/>
      </p:with-input>
   </p:wrap-sequence>
</p:declare-step>

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="sequence">Root element is not 'sequence'.</s:assert>
      </s:rule>
   </s:pattern>
   <s:pattern>
      <s:rule context="/sequence">
         <s:assert test="count(*) = 3">Wrong number of children.</s:assert>
         <s:assert test="@seq = 'true'">The seq attribute is incorrect.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

01 Feb 2025, Norm Tovey-Walsh

Tests for p:wrap-sequence (Partly ported from 1.0)