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

Re: Defaulting step and port on p:pipe

From: Innovimax SARL <innovimax@gmail.com>
Date: Wed, 1 Aug 2007 18:19:52 +0200
Message-ID: <546c6c1c0708010919o51836bc9r8d3d6d64cffe1fc@mail.gmail.com>
To: "Norman Walsh" <ndw@nwalsh.com>
Cc: public-xml-processing-model-wg@w3.org

On 8/1/07, Norman Walsh <ndw@nwalsh.com> wrote:
> The main reason I see for allowing the step/port to be defaulted on
> p:pipe is to continue our drive towards syntactic cleanliness.
> Consider:
>
> <p:pipeline>
>   <p:input port="document" primary="yes"/>
>   <p:input port="stylehseet"/>
>
>   <p:xinclude/>
>
>   <p:xslt>
>     <p:input port="stylesheet">
>       ???
>     </p:input>
>   </p:xslt>
> </p:pipeline>
>
> The primary input, the document, flows naturally through the pipeline.
> But in order to link the pipeline's stylesheet input to the XSLT step,
> we need to add a name to the pipeline and fully qualify the port:
>
> <p:pipeline name="main">
>   <p:input port="document" primary="yes"/>
>   <p:input port="stylehseet"/>
>
>   <p:xinclude/>
>
>   <p:xslt>
>     <p:input port="stylesheet">
>       <p:pipe step="main" port="stylesheet"/>
>     </p:input>
>   </p:xslt>
> </p:pipeline>
>
> If we allowed the step and port to be defaulted, then we could simply
> say:
>
> <p:pipeline>
>   <p:input port="document" primary="yes"/>
>   <p:input port="stylehseet"/>
>
>   <p:xinclude/>
>
>   <p:xslt>
>     <p:input port="stylesheet">
>       <p:pipe port="stylesheet"/>
>     </p:input>
>   </p:xslt>
> </p:pipeline>
>
> Similarly, in cases where a subsequent step wanted the primary output
> From another step, it could simply refer to the step and not bother
> with "port='result'".
>
> I don't feel strongly about it, but it seems not unreasonable to me.
>

ok beside the fact that you missssspelled stylesheet :-)

I fear that it will force us to have almost unique name for everything

but I can see very interesting use case (for example, 'current' in
for-each/viewport)

but I thing we should throw some errors when there could be ambiguousity:

For example what if the port is not a primary port ?

<p:xinclude/>
<p:xsl-formatter/>
<p:identity>
   <p:input port="source">
      <p:pipe port="result"/> <!-- which one : xinclude or xsl:formatter -->
  </p:input>
</p:identity>

or a "following step port" ?
<p:xinclude />
<p:identity>
   <p:input port="source">
      <p:pipe port="secondary"/> <!-- the xslt2 step is after the identity -->
  </p:input>
</p:identity>
<p:xslt2>
  <p:input port="source">
     <p:pipe somewhere/>
  </p:input>
  <p:input port="stylesheet">
    <p:pipe somewhere else />
  </p:input>
</p:xslt2>


(an interesting corner case is to take this example and remove the
"p:pipe somewhere" )


I'm not sure the question, I raise are solely related to the
introduction of this simplication, but I need to be sure there won't
be nasty case where we need to think 10 minutes before understanding
what happen

Mohamed


-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Wednesday, 1 August 2007 16:20:04 GMT

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