- From: Norman Walsh <ndw@nwalsh.com>
- Date: Fri, 21 Nov 2008 07:47:51 -0500
- To: public-xml-processing-model-wg@w3.org
- Message-ID: <m2abbtqm88.fsf@nwalsh.com>
Toman_Vojtech@emc.com writes:
> Today I found two small things:
>
> 5.1.2 says:
>
> "If a parameter input port on a ***p:pipeline*** is not bound, it is
> treated as if it was bound to an automatically created p:sink step. In
> other words, if a ***p:pipeline*** does not contain any steps that have
> parameter input ports, ..."
>
> Shouldn't the text use "pipeline which contains the step" instead of
> p:pipeline? The containing pipeline can be represented also by
> p:declare-step, not only p:pipeline, so the text may be misleading that
> this behavior applies only to p:pipeline.
No, I don't think so. This clause really does only apply to p:pipeline.
If you say
<p:pipeline>
...
you *implicitly* get an primary parameter input port named "parameters".
If there's no binding for a primary input port, that's an error. So in
the case where you have a p:pipeline and don't use the parameter input port,
we need to say what happens to it. We say that it's implicitly bound to
p:sink so that it just "goes away".
If you use p:declare-step, then you don't get the parameter input port
implicitly, you have to put it in *explicitly*. If you put it in
explicitly, you have to explicitly bind it too, or that is an error.
> I am also wondering: how can anything be bound (be it only formally) to
> p:sink which has no output ports?
Consider this pipeline:
<p:declare-step ...>
<p:input port="source"/>
<p:input port="params" kind="parameter"/>
<p:output port="result"/>
<p:identity/>
</p:declare-step/>
It's not valid because it has an unbound primary input port. But this
one is fine:
<p:declare-step name="main" ...>
<p:input port="source"/>
<p:input port="params" kind="parameter"/>
<p:output port="result">
<p:pipe step="identity" port="result"/>
</p:output>
<p:identity name="identity"/>
<p:sink>
<p:input port="source">
<p:pipe step="main" port="params"/>
</p:input>
</p:sink>
</p:declare-step/>
> 5.1.2/Example 10 says:
> "This p:pipeline declares that it accepts parameters."
>
> The pipeline contains no parameter input port, so I think we should
> remove the sentence.
Nope. It's a p:pipeline, so it *does* declare parameters. From 4.1:
The p:pipeline element is just a simplified form of step
declaration. A document that reads:
<p:pipeline some-attributes>
some-content
</p:pipeline>
can be interpreted as if it read:
<p:declare-step some-attributes>
<p:input port='source' primary='true'/>
<p:input port='parameters' kind='parameters' primary='true'/>
<p:output port='result' primary='true'>
some-content
</p:declare-step>
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | It is better to waste one's youth than
http://nwalsh.com/ | to do nothing with it at all.--Georges
| Courteline
Received on Friday, 21 November 2008 12:48:33 UTC