Re: Shadowing of variables..

Vojtech writes:

> These two statements clearly contradict each other. I think the fix
> is to remove the mention of shadowing from 5.7, but the WG will need
> to discuss this.

I'm not so sure.

  "It is a static error (err:XS0004) if an option or variable
  declaration duplicates the name of any other option or variable in
  the same environment. That is, no option or variable may lexically
  shadow another option or variable with the same name."

What's "the same environment"?  How does it differ from "the same
step"?  Surely we want user-defined steps to be "seperate"
environments.  I think 5.7 should stay, with a carefully stated
exception, possibly limited to ruling out redeclaration in the same
step.

Does your implementation actually rule out 

       <p:variable name="myvar" select="1"/>
       <p:group>
               <p:variable name="myvar" select="2"/>

?

That seems to me to be a bug in Calabash, if it is in fact ruled out
as reported -- clause 5 in the definition of *standard modification*
explictly covers this case:

  The names and values from each p:variable present at the beginning
  of the container are added, in document order, to the in-scope
  bindings. A new binding replaces an old binding with the same name.

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

Received on Monday, 28 November 2011 08:38:35 UTC