Re: Default binding of parameter input ports

"Toman_Vojtech@emc.com" <Toman_Vojtech@emc.com> writes:

>> 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>

Ah, right. So this is a case where the decision is arbitrary. The question
is, if I run:

   xproc-processor main.xpl -parameter foo=myfoovalue

what result is least surprising from the point of view of the user.

The status quo says that the result that's least surprising is the one
where the user's value wins. I still think that's the case. If the
pipeline author wants to make sure the user can't override the value,
they have a way to do that.

>> 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.

As long as the WG ratifies the editor's scribblings :-)

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | We think in generalities, but we live
http://nwalsh.com/            | in detail--Alfred North Whitehead

Received on Monday, 26 October 2009 10:14:59 UTC