Tests that p:message outputs a sequence.
Test p-message-006.xml is expected to pass.
<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.0">
<p:import href="https://xmlcalabash.com/ext/library/pipeline-messages.xpl"/>
<p:output port="result"/>
<p:message name="message" test="true">
<p:with-option name="select" select="(1,2,3,'Spanish Inquisition',5)"/>
<p:with-input>
<doc/>
</p:with-input>
</p:message>
<cx:pipeline-messages p:depends="message" level="info" message-attribute="false"/>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns prefix="cx" uri="http://xmlcalabash.com/ns/extensions"/>
<s:pattern>
<s:rule context="/">
<s:assert test="cx:messages">The document root is not correct.</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="/cx:messages">
<s:assert test="cx:message[1][@level='INFO' and .= '1']">
>Incorrect first item.</s:assert>
<s:assert test="cx:message[2][@level='INFO' and .= '2']">
>Incorrect second item.</s:assert>
<s:assert test="cx:message[3][@level='INFO' and .= '3']">
>Incorrect third item.</s:assert>
<s:assert test="cx:message[4][@level='INFO' and .= 'Spanish Inquisition']">
>Incorrect fourth item.</s:assert>
<s:assert test="cx:message[5][@level='INFO' and .= '5']">
>Incorrect fifth item.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.