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

Re: Determining whether a pipeline has a (defaulted) output

From: Norman Walsh <ndw@nwalsh.com>
Date: Mon, 01 Oct 2007 13:16:02 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <m2odfivjql.fsf@nwalsh.com>
/ Richard Tobin <richard@inf.ed.ac.uk> was heard to say:
| A pipeline with no output declarations has an output if its last step
| does.  Its last step may be a call to another pipeline, so we have to
| determine whether that has an output.  Now consider:
|
| <p:pipeline-library xmlns:p="http://www.w3.org/ns/xproc" 
|                     xmlns:e="http://example.org" namespace="http://example.org">
| <p:pipeline name="pipe1">
|   <e:pipe2/>
| </p:pipeline>
|
| <p:pipeline name="pipe2">
|   <p:choose>
|     <p:when test="foo">
|       <p:identity/>
|     </p:when>
|     <p:otherwise>
|       <e:pipe1/>
|     </p:otherwise>
|   </p:choose>
| </p:pipeline>
|
| </p:pipeline-library>

Ugh.

| (Does anyone have an implementation that can handle it?)

Not I. Not yet, anyway. :-)

| We can deduce that both pipe1 and pipe2 have an output, because
| otherwise the choose would have inconsistent outputs, but that seems
| a rather undesirable way to proceed.

I think maybe defaulting the inputs and outputs to the p:pipeline was
going too far.

I've already encountered the problem that the harness I wrote for
running test pipelines can't tell what inputs and outputs to expect
for the pipeline by simply inspecting it.

I'd support making the inputs and outputs to the p:pipeline explicit
without changing the rules anywhere else.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Those who in their youth did not live
http://nwalsh.com/            | in self-harmony, and who did not gain
                              | the true treasures of life, are later
                              | like long-legged old herons standing
                              | sadly by a lake without fish.--The
                              | Dhammapada

Received on Monday, 1 October 2007 17:16:21 GMT

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