- From: Norman Walsh <ndw@nwalsh.com>
- Date: Fri, 23 Oct 2009 15:18:30 -0400
- To: public-xml-processing-model-comments@w3.org
- Message-ID: <m2hbtpex6h.fsf@nwalsh.com>
Jeni Tennison <jeni@jenitennison.com> writes: [...] > Am I correct that: > > <p:declare-step> > <p:output port="result" /> > > <p:xslt> > <p:input port="source">...</p:input> > <p:input port="stylesheet">...</p:input> > </p:xslt> > </p:declare-step> > > is invalid for the same reason? (With the possible fixes being to > explicitly indicate that the 'parameters' input port for <p:xslt> is > empty, or to create a primary parameter input port for the declared > step.) Yes. > [snip] >>> What I am proposing is something like this: >>> >>> If there is a p:with-param for a parameter input port, that port gets >>> *never* connected to the primary parameter input port of the owner >>> pipeline automatically; if you want that, you can always use an >>> explicit >>> binding. If there is no p:with-param for a parameter port, the port >>> gets >>> connected to the primary parameter input port of the owner pipeline. >> >> I guess I could live with that, but it's much more of a coin toss to >> me. Parameters are pretty confusing, I really don't know if making the >> rules more complex helps or hurts with respect to users figuring out >> what they need to do. > > 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. > 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. Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | But the fact that some geniuses were http://nwalsh.com/ | laughed at does not imply that all who | are laughed at are geniuses. They | laughed at Columbus, they laughed at | Fulton, they laughed at the Wright | brothers. But they also laughed at Bozo | the Clown.--Carl Sagan
Received on Friday, 23 October 2009 19:19:15 UTC