Syntax and semantics

Subpiplines are going to occur in several components ("for-each",
"peephole", and "if" at least, as well as in nested pipelines if we
allow that). I imagine that we want the pipeline document itself to
have the same syntax as a subpipeline.

I further imagine that we want subpipelines to be self-contained. That
is, a component inside a subpipeline can refer to the inputs to the
subpipeline and to outputs from other components in the subpipeline,
but can't refer to arbitrary labels defined on components outside the
subpipeline. If you want to refer to other documents, you have to
explicitly pass them to the subpipeline.

That seems to yield a syntax something like this:

<p:pipeline xmlns:p="http://xproc.org/ns/p">
<p:input name="doc" label="doclabel"/>
<p:output name="out" label="outlabel"/>

<p:step name="p:load">
  <p:input name="input" href="/projects/src/StaxTest/test/style.xsl"/>
  <p:output name="output" label="style"/>
</p:step>

<p:step name="p:xslt10">
  <p:input name="document" ref="doclabel"/>
  <p:input name="stylesheet" ref="style"/>
  <p:output name="output" ref="outlabel"/>
</p:step>

</p:pipeline>

On the one hand, I think it's pretty clear what this means. On the other,
it bothers me slightly that the pipeline p:input and p:output elements
are semantically quite different from the p:input and p:output elements
of other components.

In particular:

- Unlike the other components, there are an arbitrary number of them.
- Unlike the other components, a label is required on each p:input (where
  I'd expect labels to be forbidden on the p:input elements for other
  components)
- Unlike other components, the p:output of a component can refer to
  the subpipeline's p:output element by reference.

Does anyone else feel any syntactic/semantic discordance here? Is it
worth fixing? How?

                                        Be seeing you,
                                          norm

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

Received on Wednesday, 10 May 2006 15:00:52 UTC