RE: Default binding of parameter input ports

> -----Original Message-----
> From: public-xml-processing-model-comments-request@w3.org 
> [mailto:public-xml-processing-model-comments-request@w3.org] 
> On Behalf Of Norman Walsh
> Sent: Friday, October 23, 2009 9:19 PM
> To: public-xml-processing-model-comments@w3.org
> Subject: Re: Default binding of parameter input ports

> > FWIW, what I'd expect is, in:
> >
> > <p:pipeline>
> >    <p:xslt>
> >      <p:input port="source">...</p:input>
> >      <p:input port="stylesheet">...</p:input>
> >      <p:with-param name="foo" select="..." />
> >    </p:xslt>
> > </p:pipeline>
> >
> > for the parameters passed to the pipeline to get passed 
> through to the  
> > XSLT, with the $foo parameter always provided with the 
> default value  
> > that's specified on the <p:with-param>.
> 
> And that's what you'd get.

No, it is not. Because the implicit connection to the parameter input
port of the pipeline occur logically *after* any p:with-param, the value
of "foo" specified using p:with-param may be overwritten by the "foo"
parameter value passed to the pipeline. To be sure that p:with-param has
precedence over the default binding, you have to do:

<p:pipeline name="main">
   <p:xslt>
     <p:input port="source">...</p:input>
     <p:input port="stylesheet">...</p:input>
     <p:input port="parameters">
       <p:pipe step="main" port="parameters"/>
     </p:input>
     <p:with-param name="foo" select="..." />
   </p:xslt>
</p:pipeline>
 
> > And in:
> >
> > <p:declare-step>
> >    <p:output port="result" />
> >    <p:xslt>
> >      <p:input port="source">...</p:input>
> >      <p:input port="stylesheet">...</p:input>
> >      <p:with-param name="foo" select="..." />
> >    </p:xslt>
> > </p:declare-step>
> >
> > for the XSLT to be passed only the $foo parameter and nothing else  
> > because the step declaration has no primary parameter input port.
> >
> > In other words, I agree with Vojtech that the presence of 
> the <p:with- 
> > param> should mean that the lack of connection to the XSLT steps  
> > primary parameter input port doesn't matter; but I don't 
> agree with  
> > him that the presence of the <p:with-param> should cancel out the  
> > implicit connection between the primary parameter input 
> port on the  
> > step and the one from its container.
> 
> Although I didn't actually say it, this is what I had in mind when I
> spoke of making the rules more complex. If we change the status quo,
> then I think Jeni's proposed semantics are the right ones.

OK, I agree with this. And I see you already incorporated this in the
new draft, which is cool.

Regards,
Vojtech

Received on Monday, 26 October 2009 08:54:01 UTC