- From: Norman Walsh <ndw@nwalsh.com>
- Date: Fri, 21 Nov 2008 08:33:47 -0500
- To: public-xml-processing-model-wg@w3.org
- Message-ID: <m2k5axp5j8.fsf@nwalsh.com>
Toman_Vojtech@emc.com writes: > Ooops, I missed this somehow. I guess I have to fix this in our > implementation. Thanks for a bug report. :) :-) > One question, though, just to be sure: If I use p:declare-step instead > of p:pipeline, and I declare a primary parameter input port there, we > don't manufacture the default binding to it in that case? We manufacture default bindings to steps that expect parameters. This pipeline works just like you'd expect if you wrote it with p:pipeline: <p:declare-step name="main" ...> <p:input port="source"/> <p:input port="params" kind="parameter"/> <p:output port="result"/> <p:xslt> <p:input port="stylesheet">...</p:input> </p:xslt> </p:declare-step/> What we don't manufacture is the p:sink step if you've explicitly created a parameter input port and then *never* actually used it. > Ah, so it is about something connecting to the parameter input port, not > that the port must be connected to something. But I thought that inside > a compound step, you don't have to connect anything to the declared > input steps. Only when you *use* the step, you have to connect its input > ports to something... I thought that pipelines like the following would > run just fine (the compound step just ignores any data/parameters it > gets): > > <p:declare-step ...> > <p:input port="source" primary="true"/> > <p:input port="another-source"/> > <p:input port="params" kind="parameter"/> > <p:output port="result"/> > <p:identity> > <p:input port="source"><p:document href="..."/></p:inline> > </p:identity> > </p:declare-step/> > > Sorry, I am probaly just under attack of my recurring confusion about > what "connected" and "binding" actually means in XProc... To my surprise, I think you're right (I'm not surprised you were right, I'm surprised about the spec :-). No where in our spec does it say that *input* ports have to be bound. I wonder if it should? I think probably not. I wonder if it used to, or if I just imagined that it did? In any event, unless we change the spec to say that (primary) input ports must be bound, I think we can drop that paragraph about automatic binding to p:sink for parameter input ports on p:pipeline that aren't used. Good catch, Vojtech! Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | If brute force doesn't work, maybe http://nwalsh.com/ | you're not using enough brute force.
Received on Friday, 21 November 2008 13:34:30 UTC