<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>1610</bug_id>
          
          <creation_ts>2005-07-15 00:06:53 +0000</creation_ts>
          <short_desc>don&apos;t environments behave like a stack?  why not say so?</short_desc>
          <delta_ts>2007-01-16 17:28:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Formal Semantics 1.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 2000</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fred Zemke">fred.zemke</reporter>
          <assigned_to name="Jerome Simeon">simeon</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4686</commentid>
    <comment_count>0</comment_count>
    <who name="Fred Zemke">fred.zemke</who>
    <bug_when>2005-07-15 00:06:53 +0000</bug_when>
    <thetext>2.1.4 Notations for environments
It says &quot;Also, note that there are no operations to remove 
entries from environments.  This is never necessary as updating
an environment effectively creates a new extended copy of the
original environment, leaving the original environment 
accessible wherever it is in scope along with the updated copy.&quot;
So which copy is used in case of a conflict?  Example:
an outer scope has a variable named $v and an inner scope 
creates a new variable named $v with a different value.  So 
which value is accessed?  I think the truth is that creation of
a new environment completely occludes the old environment,
so it is not true to say that both the old and the new 
environment are accessible.  I think
the behavior is actually a stack, and only the top environment 
on a stack is used.  When the scope that created the top 
environment exits, then that environment is popped from the stack,
bringing the outer environment back into visibility.
I think that expressing the behavior in this fashion would be
both more correct and more understandable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4876</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-07-19 16:45:29 +0000</bug_when>
    <thetext>I believe this is editorial.
- Jerome</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9162</commentid>
    <comment_count>2</comment_count>
    <who name="Mary Fernandez">mff</who>
    <bug_when>2006-04-11 22:15:56 +0000</bug_when>
    <thetext>The paragraph immediately following the one below 
already addresses this point:

 &lt;p&gt;Updating an environment creates a copy of the original
      environment and overrides any previous binding that might exist
      for the same name and the same component in that
      environment. Updating the environment is used to capture the
      &lt;emph&gt;scope&lt;/emph&gt; of a symbol (e.g., for variables, namespace
      prefixes, etc). For instance, in the following expression&lt;/p&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>