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

Output ports

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Wed, 23 Aug 2006 13:11:36 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <87hd03v0l3.fsf_-_@nwalsh.com>
/ Jeni Tennison <jeni@jenitennison.com> was heard to say:
| 13. Section 4.2.13 (p:declare-component Element), the last paragraph says:
|
|   "The input and parameter declarations of a p:declare-component may use
|    the name "*" to indicate that the component accepts an arbitrary
|    number of inputs, outputs, or parameters."
|
| Is "*" allowed on output declarations too? If it is, then the
| paragraph should say:
|
|   "The input, output, and parameter declarations of a
|    p:declare-component may use the name "*" to indicate that the
|    component accepts or provides an arbitrary number of inputs, outputs,
|    or parameters."
|
| If not, then it should say:
|
|   "The input and parameter declarations of a p:declare-component may use
|    the name "*" to indicate that the component accepts an arbitrary
|    number of inputs or parameters."

Right. I had originally writtent the former, but at the last telcon,
there was pushback to the idea of allowing an arbitrary number of
output ports. The only component that we could think of that would use
this functionality was p:tee.

The crux of the problem is that we don't allow p:output elements (we don't
even *have* p:output elements anymore) on steps. So you can say:

  <p:step name="fork" component="p:tee">
    <p:input port="document">
      <mydoc/>
    </p:input>
  </p:step>

But how do downstream components "x" and "y" refer to the output of
p:tee? What port names does it have?

Having given this some more thought, I have a proposal. I think we
should allow p:output elements. For most components, they will have
to have fixed names:

  <p:step name="xform" component="p:xslt">
    <p:input port="document" .../>
    <p:input port="stylesheet" .../>
    <p:output port="result" .../>
  </p:step>

It would be an error to refer to any port other than "result" on a
p:xslt step. (And it would be ok to leave it out, it would be inferred
by the processor.)

But on a step declared like so:

  <p:declare-component component="p:tee">
    <p:declare-input port="document"/>
    <p:declare-output port="*"/>
  </p:declare-component>

the p:output elements cause the named ports to spring into existence:

  <p:step name="fork" component="p:tee">
    <p:input port="document">
      <mydoc/>
    </p:input>
    <p:output port="out"/>
    <p:output port="outheretoo"/>
  </p:step>

Why is this valuable?

1. It gives the author a place to hang extension elements on the output
   (for debugging, for example).

2. It allows the author to make explicit the outputs of steps.

3. It allows declare-output port="*" to work for p:tee and any other
   components that an implementor wants to invent with the semantic
   that they can produce an arbitrary number of outputs.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Wednesday, 23 August 2006 17:11:33 GMT

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