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

Re: Pipeline naming example

From: Alessandro Vernet <avernet@orbeon.com>
Date: Wed, 2 Aug 2006 20:09:54 -0700
Message-ID: <4828ceec0608022009l35601b42q659f257d8bccb33b@mail.gmail.com>
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>


1) Looking at the choose input:

<p:choose name="validxi">
    <p:declare-input port="input" ref="#pipe/pre-xi-schema"/>

The name of the port ("input") seems to be a convention. Adding
port="input" does not add any additional useful information, as it
would always be "input". What about removing it, and moving the 'ref'
on the <p:choose> element? We get rid of a "convention", and make the
syntax lighter. That would leave us with:

<p:choose name="validxi" ref="#pipe/pre-xi-schema">

2) Looking at how we connect the choose output to steps outputs:

<p:choose name="validxi">
    <p:declare-input port="input" ref="#pipe/pre-xi-schema"/>
    <p:declare-output port="result"/>

    <p:when test="/*">
        <p:step kind="validate">
            <p:input port="document" ref="#pipe/document"/>
            <p:input port="schema" ref="#pipe/pre-xi-schema"/>
            <p:output port="result" ref="#validxi/result"/>

We add a special case here, just for the choose: the ability for an
output to reference something. I prefer to avoid this special case by
(a) naming output instead of steps and (b) using a 'ref' on the
<p:declare-output/>. This way the data provider declares a name, and
the data consumer makes a reference to that name. With this we would

<p:choose ref="pre-xi-schema">
    <p:declare-output ref="result" name="validxi"/>

    <p:when test="/*">
        <p:step kind="validate">
            <p:input port="document" ref="document"/>
            <p:input port="schema" ref="pre-xi-schema"/>
            <p:output port="result" name="result"/>

Naming outputs and naming steps is largely similar. I prefer naming
steps because it allows what is suggested above, and because it avoids
yet another special syntax (#.../...).

That's all for now,

Blog (XML, Web apps, Open Source):
Received on Thursday, 3 August 2006 03:10:18 UTC

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