W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2007

Parameters and options

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Mon, 16 Apr 2007 11:39:26 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <87odlopbv5.fsf@nwalsh.com>

  <p:declare-step type="px:debug">
    <p:parameter name="*"/>
    <p:option name="opt1"/>
    <p:option name="opt2"/>

Then, I believe our intent is that the following is legal:

  <p:load name='loader'>
    <p:input port="source">

    <p:parameter name="elemcountplus1" select="$elemcount+1"/>
    <p:parameter name="elemcount" select="count(//*)">
      <p:pipe step="loader" port="result"/>

And it's up to implementations to make sure that parameters get
evaluated in the right order and that there are no circular
dependencies. (In this case, elemcount=1 and elemcountplus1=2.)

I assume that options and parameters are in entirely different
namespaces, so:

    <p:parameter name="opt1" value="3"/>
    <p:parameter name="opt2" select="$opt1+1"/>
    <p:option name="opt1" value="5"/>
    <p:option name="opt2" value="$opt1+1"/>

Means the px:debug component gets two parameters, opt1 and opt2, with
the values 3 and 4, respectively, and two options, opt1 and opt2, with
the values 5 and 6, respectively.


                                        Be seeing you,

Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Monday, 16 April 2007 15:39:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:42 UTC