Choose 004

Test choose-004.xml is expected to pass.

The pipeline

<p:declare-step xmlns:p="" name="main" version="3.0">
  <p:option name="match"/>
  <p:output port="result"/>

  <p:identity name="id">
    <p:with-input port="source">
      <p:inline document-properties="map { 'a': '1', 'b': '2' }">

  <p:choose name="choose">
    <p:when test="p:document-property(., 'a') = $match">
        <p:with-input port="source">
    <p:when test="p:document-property(., 'b') = $match">
        <p:with-input port="source">
  <p:wrap-sequence wrapper="result"/>
MorganaXProc passing XML Calabash passing



select = '3'

Schematron validation

     <s:schema xmlns:s="">
         <s:ns prefix="c" uri=""/>
            <s:rule context="/*">
               <s:assert test="self::result">The pipeline root is not result.</s:assert>
               <s:assert test="count(self::result/*)=1">The result document should not have one child.</s:assert>
               <s:assert test="self::result/doc">The child's name should be doc.</s:assert>

Revision history

03 Apr 2019, Achim Berndzen

Changed test because a missing p:otherwise is now an implicit identity.

02 Dec 2018, Achim Berndzen

Changed test, because it not an error anymore, if no p:when is selected and no p:otherwise is present.

09 Oct 2017 21:11, Norman Walsh

Fixed namespace

09 Oct 2017 21:10, Norman Walsh

Fixed namespace

24 Sep 2017 17:47, Norman Walsh

Port my test suite; add documentation and schemas