Test that a pipeline detects incorrect options.
Test pipelineception-007.xml is expected to fail with one of the following error codes: err:XD0050 or err:XS0031.
<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:ex="http://example.com/ns" xmlns:p="http://www.w3.org/ns/xproc" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-inline-prefixes="#all" name="main" version="3.0">
<p:output port="result" sequence="true"/>
<p:declare-step type="ex:test-pipeline">
<p:output port="result" content-types="xml"/>
<p:option name="opt" as="xs:string?"/>
<p:choose>
<p:when test="empty($opt)">
<p:identity>
<p:with-input>
<test-output/>
</p:with-input>
</p:identity>
</p:when>
<p:otherwise>
<p:identity>
<p:with-input>
<test-output opt="{$opt}"/>
</p:with-input>
</p:identity>
</p:otherwise>
</p:choose>
</p:declare-step>
<p:identity>
<p:with-input>
<wrapper>{ex:test-pipeline(map{'opt':'has-value', 'other': 'error'})?result}</wrapper>
</p:with-input>
</p:identity>
</p:declare-step>
Created test.