W3C home > Mailing lists > Public > xproc-dev@w3.org > May 2009

Re: How do I connect a step to the output of p:choose?

From: Costello, Roger L. <costello@mitre.org>
Date: Sun, 17 May 2009 17:33:29 -0400
To: "'xproc-dev@w3.org'" <xproc-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB5003F3FE3771@IMCMBX3.MITRE.ORG>

Thanks a lot Norm. Per your suggestion, I added p:output to each branch of p:choose:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="myPipeline">
        <p:input port="source">
            <p:document href="BookStore.xml"/>
        <p:output port="result">
            <p:pipe step="choice" port="result" />
    <p:choose name="choice">
        <p:when test="count(//Book)&gt;1">
            <p:output port="result">
                <p:pipe step="choice1" port="result" />
            <p:store href="multipleBooks.xml" name="choice1" />
        <p:when test="count(//Book)=1">
            <p:output port="result">
                <p:pipe step="choice2" port="result" />
            <p:store href="singleBook.xml" name="choice2"/>
            <p:output port="result">
                <p:pipe step="choice3" port="result" />
            <p:store href="noBook.xml" name="choice3"/>

Works great!

Received on Sunday, 17 May 2009 21:34:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:05 UTC