Re: Variable and option binding proposal

I totally agree with Norm on this one

The scrambling implied on dependencies between step would make this
pretty hard to understand

...Unless we add a specific rule

You cannot declare two variables of the same name at the same level

This limitation would be tractable and would allow user to put there
variable where they want

Thoughts ?

Mohamed

On Thu, Mar 27, 2008 at 7:30 PM, Norman Walsh <ndw@nwalsh.com> wrote:
> / Jeni Tennison <jeni@jenitennison.com> was heard to say:
>  | Norman Walsh wrote:
>  |> / Jeni Tennison <jeni@jenitennison.com> was heard to say:
>  [...]
>
> | I was arguing that we shouldn't specify that all the variable bindings
>  | must come at the beginning if it doesn't matter when or if their
>  | values are actually computed. Let people put them where it makes sense
>  | to them.
>
>  Here's the case that worries me:
>
>  <p:pipeline type="main">
>   <p:variable name="x" value="3"/>
>
>   <p:xslt name="second">
>     <p:with-param name="x1" select="$x"/>
>     <p:input port="source">
>       <p:pipe step="first" port="result"/>
>     </p:input>
>     <p:input port="stylesheet">
>       <p:document href="http://example.com/doc.xsl"/>
>     </p:input>
>   </p:identity>
>
>   <p:variable name="x" value="4"/>
>
>   <p:xslt name="first">
>     <p:with-param name="x2" select="$x"/>
>     <p:input port="source">
>       <p:pipe step="main" port="source"/>
>     </p:input>
>     <p:input port="stylesheet">
>       <p:document href="http://example.com/doc.xsl"/>
>     </p:input>
>   </p:identity>
>  </p:pipeline>
>
>  What are the values of $x1 and $x2, respectively? How do the variables
>  get moved when the xslt steps are reordered.
>
>  I think it would be possible to say that it's the lexical, document
>  order scope that counts, even though the steps are reordered. I just
>  think that might give some implementors heart burn.
>
>                                         Be seeing you,
>                                           norm
>
>  --
>  Norman Walsh <ndw@nwalsh.com> | He that overvalues himself will
>  http://nwalsh.com/            | undervalue others, and he that
>                               | undervalues others will oppress
>                               | them.--Dr. Johnson
>



-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Thursday, 27 March 2008 19:09:56 UTC