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

Re: Comments on Editor's Draft 9 January 2008

From: Norman Walsh <ndw@nwalsh.com>
Date: Tue, 12 Feb 2008 07:51:47 -0500
To: public-xml-processing-model-comments@w3.org
Message-ID: <m23ary49ss.fsf@nwalsh.com>
/ Toman_Vojtech@emc.com was heard to say:
|> Yes, you do, you just have to use the "full form". There's 
|> nothing wrong with a pipeline document that begins:
|> 
|> <p:declare-step type="my:pipeline" xmlns:p="..." xmlns:my="...">
|>   <p:input port="fred"/>
|>   <p:input port="barney"/>
|>   <p:output port="bedrock"/>
|> 
|>   <p:xslt ...> ... </p:xslt>
|>   <p:xslt ...> ... </p:xslt>
|>   <p:xslt ...> ... </p:xslt>
|> </p:declare-step>
|> 
|> and a pipeline processor is expected to be able to run that 
|> pipeline just as if it had had "p:pipeline" as its document element.
|
| Except that neither of "fred", "barney" or "bedrock" can be declared
| primary and that I always have to make sure that the last step in the
| pipeline has a default readable port...

Sez who?

 <p:declare-step type="my:pipeline" xmlns:p="..." xmlns:my="...">
   <p:input port="fred"/>
   <p:input port="barney" primary="true"/>
   <p:output port="bedrock" primary="false"/>
 
   <p:xslt ...> ... </p:xslt>
   <p:xslt ...> ... </p:xslt>
   <p:xslt ...> ... </p:xslt>
 </p:declare-step>

In the "full form", you can make any declaratiosn you like. I'm not
sure it makes a whole lot of sense for a pipeline to have a single
non-primary output, but there you go.

| But OK, I think I can accept
| this cost. I just wanted to point out that it can make some pipelines a
| bit cumbersome.

Hopefully, I've just made them less so :-)

|> Yes, and you can do all those things, just not with the 
|> shortcut syntax.
|> 
|
| How? Using the described "direct evaluation" of steps?
|
| xproc -i src=x.xml -o res=o.xml \
|       -d acme-library.xml -ns acme=http://www.acme.com \
|       -pipeline acme:my-pipeline
|
| In order to use the "full form", the pipeline must be declared first
| using p:declare-step, so the "direct evaluation" is the only way of
| running such a pipeline I can think of.

No, I think the following should work too:

xproc -i src=x.xml -o res=o.xml mypipeline.xml

assuming that mypipeline.xml contains

  <p:declare-step type="acme:my-pipeline" xmlns:p=... xmlns:acme=...>
    <p:input port="src"/>
    <p:output port="res"/>
    ...
  </p:declare-step>

Though I suppose we are off in the "implementation defined" areas when we
talk about exactly how a processor runs a pipeline.

I sure want it to be simple in the common cases, though.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | One stops being a child when one
http://nwalsh.com/            | realizes that telling one's trouble
                              | does not make it better.--Cesare Pavese

Received on Tuesday, 12 February 2008 12:52:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 12 February 2008 12:52:07 GMT