W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2011

Re: Shadowing of variables..

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Mon, 28 Nov 2011 08:37:52 +0000
To: <vojtech.toman@emc.com>
Cc: <xproc-dev@w3.org>
Message-ID: <f5bborw7icf.fsf@calexico.inf.ed.ac.uk>
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

Does your implementation actually rule out 

       <p:variable name="myvar" select="1"/>
               <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.

       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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:01 UTC