W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > March 2006


From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Wed, 15 Mar 2006 09:56:58 -0500
To: public-xml-processing-model-wg@w3.org
Message-ID: <87fyljzrgl.fsf@nwalsh.com>
With inputs, outputs, and sub-pipelines out of the way, we come,
somewhat indirectly, to conditionals. Despite all the complex drawings
that we had on the board at the f2f, I think a conditional (at least
one where the condition can be evaluated before execution of the
pipeline begins) is fairly simple conceptually.

Let's say we have a p:choose element. If we say that all the branches
of the choice must have the same number of inputs and outputs then
I think it's not too difficult to understand:

    <p:input name="schemas" label="s"/>
    <p:input name="document" label="d"/>
    <p:output label="ok"/>

    <p:when test="$status = 'draft'">
      <p:step name="devnull">
        <p:input use="s"/>
      <p:step name="identity">
        <p:input name="document" use="d"/>
    <p:when test="$status = 'final'">
      <p:call-pipeline name="expandandvalidate">
        <p:input name="schemas" use="s"/>
        <p:input name="document" use="d"/>
        <p:input use="s"/>
        <p:input use="d"/>
        <p:message>What the heck did you set $status to exactly?</p:message>

Like a sub-pipeline, a p:choose defines its inputs and outputs, that
way it fits into the pipeline irrespective of what branch is selected.

I haven't got my head around how to define tests that are evaluated at
runtime based on currently active inputs and outputs.

                                        Be seeing you,

Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Wednesday, 15 March 2006 14:57:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:39 UTC