Re: Variables and parameters

/ Alessandro Vernet <avernet@orbeon.com> was heard to say:
|> (If the distinction between defining and setting parameters is
|> confusing, perhaps it would be less so if we used <p:param> elements at
|> the pipeline level and <p:with-param> or <p:set-param> elements at the
|> step level.)
|
| +1 for using <p:param> / <p:with-param>

I can't quite get my head around how this helps.

Is this what's intended?

<p:pipeline>
  ...

  <p:pipeline name="my:subPipe">
    <p:param name="foo"/>
    <p:input name="document" label="doc"/>
    <p:output name="result" label="out"/>

    <p:step name="someStepName">
      <p:param name="bar" select="$foo"/>
      <p:input ref="doc"/>
      <p:output ref="out"/>
    </p:step>
  </p:pipeline>

  <p:step name="load">
    <p:param name="uri" select="someURI"/>
    <p:output label="xiout"/>
  </p:step>

  <p:step name="my:subPipe">
    <p:with-param name="foo" select="'someValue'"/>
    <p:input name="document" ref="xiout"/>
    <p:output name="result" label="pipeOut"/>
  </p:step>

  ...
</p:pipeline>

How is putting p:param in the load step but p:with-param in the
my:subPipe step easier to understand? If it's with-param, why isn't it
also with-input and with-output?

There's something here I just don't get.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Thursday, 18 May 2006 11:51:54 UTC