- From: Norman Walsh <ndw@nwalsh.com>
- Date: Sun, 12 Oct 2008 11:48:38 -0400
- To: public-xml-processing-model-wg@w3.org
- Message-ID: <m2bpxp3jc9.fsf@nwalsh.com>
Consider this pipeline: <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:px="http://example.org/ns/pipelines" xmlns:c="http://www.w3.org/ns/xproc-step" name="main"> <p:input port="parameters" kind="parameter"> <p:inline> <c:param-set> <c:param name="foo" value="1"/> </c:param-set> </p:inline> </p:input> <p:input port="source"/> <p:output port="result"> <p:pipe step="params" port="result"/> </p:output> <p:parameters name="params"> <p:input port="parameters"> <p:pipe step="main" port="parameters"/> </p:input> <p:with-param name="foo" select="'bar'"/> </p:parameters> </p:declare-step> The output of this pipeline is a c:param-set element with "foo='bar'" because the with-param occurs after the parameter input port. If we reverse the order of the elements in the p:parameters step: <p:parameters name="params"> <p:with-param name="foo" select="'bar'"/> <p:input port="parameters"> <p:pipe step="main" port="parameters"/> </p:input> </p:parameters> Then the output of this pipeline is a c:param-set element with "foo='1'" because the with-param occurs before the parameter input port. We all agree so far, right? So what's the output if we specify the p:parameters step this way? <p:parameters name="params"> <p:with-param name="foo" select="'bar'"/> </p:parameters> In other words, what is the relative order of the implicit bindings? I'm inclined to say they come last, that they come after the things that you specify explicitly. But I think that by the principle of least surprise, the value specified by the lone with-param should be respected. Thoughts? Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | I'm NOT in denial! http://nwalsh.com/ |
Received on Sunday, 12 October 2008 15:49:22 UTC