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

Re: Saxonica Comments on XProc last-call draft, sections 1 and 2

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 26 Sep 2007 22:25:09 +0100
Message-ID: <46FACE35.6030504@jenitennison.com>
To: Michael Kay <mike@saxonica.com>
CC: 'Norman Walsh' <ndw@nwalsh.com>, public-xml-processing-model-comments@w3.org

Hi Mike,

Thanks for taking the time to give us such a detailed review.

Michael Kay wrote:
>> | 6. Clarification. In 2.2, I don't understand this: "Within 
>> a compound 
>> | step, the declared outputs of the step can be connected to: * The 
>> | output port of some contained step. * A fixed, inline document or 
>> | sequence of documents. * A document read from a URI." How can an 
>> | output of a step be a document read from a URI?
>> Like this:
>>   <p:group>
>>     <p:output port="out1"> ... </p:output>
>>     <p:output port="out2">
>>       <p:document href="someURI"/>
>>     </p:output>
>>   </p:group>
>> It seems a little silly in isolation, but recall that all of 
>> the branches of a choose have to have the same outputs. In 
>> the otherwise branch, you may want to dummy up some of them. 
>> Having allowed a fixed, inline binding, it seems arbitrary to 
>> forbid a URI binding.
> I'm still confused. There's obviously something here I haven't grasped. I
> thought p:output was defining the destination for something that a step
> creates, and I don't see how that can be "a document read from a URI".

The content of <p:output> doesn't indicate where the document *goes*, it 
indicates where the document bound to that output *comes from*. For 
example, here's a (rather explicit) pipeline:

<p:pipeline name="simple-example">
   <p:input port="source" />
   <p:input port="config" />
   <p:output port="result" />

   <p:choose name="prefs">
       <p:pipe step="simple-example" port="config" />
     <p:when test="my:config/my:prefs">
       <p:output port="result">
         <p:pipe step="load-prefs" port="result" />
       <p:load name="load-prefs">
         <p:option href="my:config/my:prefs" />
        <p:output port="result">
          <p:document href="default-prefs.xml" />

It takes a source and a config, and chooses a preferences file based on 
the <my:prefs> element in the configuration file; if there's no 
preferences file named in the configuration file, it loads the default 
preferences from default-prefs.xml.

In the <p:output> within the <p:when>, the <p:pipe> points to the output 
of the load-prefs step (the content of the <p:output> indicates where 
the document feeding the <p:output> comes *from*). Similarly, in the 
<p:output> in the <p:otherwise>, the <p:document> points to an XML 
document (again, the content of the <p:output> indicates where the 
document feeding the <p:output> comes *from*).

If that makes sense, perhaps you have suggestions about how we can make 
it clearer in the spec?


Jeni Tennison
Received on Wednesday, 26 September 2007 21:25:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:28:24 UTC