Re: Why does this pipeline output two c:param-sets?

"Costello, Roger L." <costello@mitre.org> writes:
> This pipeline outputs the content of the parameter input port:
>
> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
>                 xmlns:c="http://www.w3.org/ns/xproc-step"
>                 name="myPipeline">
>
>     <p:input port="parameters" kind="parameter">
>         <p:inline>
>             <c:param-set>
>                 <c:param name="Title" value="First and Last Freedom" />
>                 <c:param name="Author" value="J. Krishnamurti" />
>                 <c:param name="Date" value="1954" />
>                 <c:param name="ISBN" value="0-06-064831-7" />
>                 <c:param name="Publisher" value="Harper &amp; Row" />
>             </c:param-set>
>         </p:inline>
>     </p:input>
>
>     <p:output port="result" sequence="true" />
>
>     <p:identity>
>         <p:input port="source">
>             <p:pipe step="myPipeline" port="parameters" />
>         </p:input>
>     </p:identity>
>
> </p:declare-step>
>
> Surprisingly, I get as output two <c:param-set> elements:

That's a bug. But it raises an interesting question. What should happen
if you run the above pipeline like this:

  $ calabash pipeline.xpl name=value

Should the parameters port contain a parameter named "name" or not?

My first thought is that it should not. But I could be persuaded
otherwise, since we already treat parameters somewhat specially.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | In theory, there is no difference
http://nwalsh.com/            | between theory and practice, but not in
                              | practice.

Received on Sunday, 28 June 2009 21:06:55 UTC