Tests that message on p:when is forbidden.
Test message-009.xml is expected to fail with error code err:XS0008.
<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" version="3.0">
<p:import href="https://xmlcalabash.com/ext/library/pipeline-messages.xpl"/>
<p:output port="result"/>
<p:identity>
<p:with-input>
<doc/>
</p:with-input>
</p:identity>
<p:choose name="dep">
<p:when test="true()" message="Element is {node-name(/*)}">
<p:identity/>
</p:when>
</p:choose>
<cx:pipeline-messages p:depends="dep" level="info"/>
</p:declare-step>
Created test.