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

Inputs and outputs

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Wed, 15 Mar 2006 09:55:40 -0500
To: public-xml-processing-model-wg@w3.org
Message-ID: <87oe07zrir.fsf@nwalsh.com>
A few design notes and sketches. (Syntax imaginary)

If two pipeline steps occur in sequence (document order) and the first
stage has one output and the second stage has one input, then we can
assume they're joined together:

  <p:step name="xinclude">
    <p:input href="somedocument.xml"/>
    <p:output/>
  </p:step>

  <p:step name="somefilter">
    <p:input/>
    <p:output/>
  </p:step>

If the steps aren't in sequence, or if there are multiple inputs and
outputs in play, then the pipeline has to specify the fittings:

  <p:step name="validate">
    <p:input name="schemas" href="a.xsd b.xsd c.xsd"/>
    <p:input name="document" href="style.xsl"/>
    <p:output label="a"/>
  </p:step>

  <p:step name="xinclude">
    <p:input href="somedocument.xml"/>
    <p:output label="b"/>
  </p:step>

  <p:step name="style">
    <p:input name="stylesheet" use="a"/>
    <p:input name="document" use="b"/>
    <p:output/>
  </p:step>

We could say that a p:input or p:output that is implicit can be omitted,
reducing the last step to:

  <p:step name="style">
    <p:input name="stylesheet" use="b"/>
    <p:input name="document" use="a"/>
  </p:step>

And the somefilter step further above to:

  <p:step name="somefilter"/>

We could extend the idea that stages with a single input and single output
can be implicitly joined together to say that any sequence that has exactly
one unlabeled input and one unlabeled output is also implicitly fitted:

  <p:step name="validate">
    <p:input name="schemas" href="a.xsd b.xsd c.xsd"/>
    <p:input name="document" href="style.xsl"/>
    <p:output label="a"/>
  </p:step>

  <p:step name="xinclude">
    <p:input href="somedocument.xml"/>
    <p:output/>
  </p:step>

  <p:step name="style">
    <p:input name="stylesheet" use="a"/>
    <p:input name="document"/>
    <p:output/>
  </p:step>

Combined with the idea that implicit inputs and outputs are optional,
that would reduce to:

  <p:step name="validate">
    <p:input name="schemas" href="a.xsd b.xsd c.xsd"/>
    <p:input name="document" href="style.xsl"/>
    <p:output label="a"/>
  </p:step>

  <p:step name="xinclude">
    <p:input href="somedocument.xml"/>
  </p:step>

  <p:step name="style">
    <p:input name="stylesheet" use="a"/>
    <p:input name="document"/>
  </p:step>

I don't think the input in the style step is implicit because it has a
name. But we could decide that it was implicit, I suppose. Actually,
having said all that, I'm not sure I like the idea of making any of
the inputs and outputs implicit; it seems like it might lead to
confusion.

                                        Be seeing you,
                                          norm

-- 
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:55:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:47 GMT