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

Re: Parameters and options

From: Innovimax SARL <innovimax@gmail.com>
Date: Mon, 16 Apr 2007 17:57:05 +0200
Message-ID: <546c6c1c0704160857t33d53881r8b139d6dbc3e477@mail.gmail.com>
To: "Norman Walsh" <Norman.Walsh@sun.com>
Cc: public-xml-processing-model-wg@w3.org

On 4/16/07, Norman Walsh <Norman.Walsh@sun.com> wrote:
> Consider:
>
>   <p:declare-step type="px:debug">
>     <p:parameter name="*"/>
>     <p:option name="opt1"/>
>     <p:option name="opt2"/>
>   </p:declare>
>
> Then, I believe our intent is that the following is legal:
>
>   <p:load name='loader'>
>     <p:input port="source">
>       <p:inline>
>         <doc/>
>       </p:inline>
>     </p:input>
>   </p:load>
>

It should be p:identity no ? p:load has no input

>   <px:debug>
>     <p:parameter name="elemcountplus1" select="$elemcount+1"/>
>     <p:parameter name="elemcount" select="count(//*)">
>       <p:pipe step="loader" port="result"/>
>     </p:parameter>
>   </px:debug>
>
> 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 would say that $elemcount is undefined in that case, because how
would you explain that

<p:group>
   <p:parameter name="a" select="'2'"/><!-- (1) -->
   <px:debug>
     <p:parameter name="a" select="$a + $b"/>
     <p:parameter name="b" select="$a"/>
   </px:debug>
</p:group>

depending on the fact that (1) is declared or not is a circular dependency

>
> I assume that options and parameters are in entirely different
> namespaces, so:
>
>   <px:debug>
>     <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"/>
>   </px:debug>
>
> 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.
>
> Right?

Surely not : how do I access to an parameter value in a option ? In a
group, I can only define a p:parameter so :
1) p:option has no access to p:parameter nor p:option (only static content)
2) p:option has access to p:parameter only
3) p:option has access to p:parameter and p:option
4) p:option has access to p:option only (non sense for me)

I prefer 2, then 3



>
>                                         Be seeing you,
>                                           norm
>
> --
> Norman Walsh
> XML Standards Architect
> Sun Microsystems, Inc.
>
>


-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 8 72 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Monday, 16 April 2007 15:57:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:50 GMT