Re: Parameters and options

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 UTC