<?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>1571</bug_id>
          
          <creation_ts>2005-07-13 18:06:00 +0000</creation_ts>
          <short_desc>[FS] technical: 4.1.2 Variable References</short_desc>
          <delta_ts>2005-09-06 12:58:41 +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>All</rep_platform>
          <op_sys>All</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</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>4542</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-13 18:06:00 +0000</bug_when>
    <thetext>4.1.2 Variable References

DEv / rule 2
&quot;an imported variable is evaluated in the dynamic context of the module in
which it is declared&quot;
    I don&apos;t think this will work. VarName&apos;s namespace prefix could be
    bound to a different namespace (or not bound at all) in the imported
    module.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5051</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-07-20 23:34:22 +0000</bug_when>
    <thetext>You are right, I believe the right way to write the inference rule is
to access the variable value directly from the module environment.

So instead of writing:

  statEnv |- VarName of var expands to expanded-QName
  dynEnv.varValue(expanded-QName) = #IMPORTED(URI)
  URI =&gt;module_dynEnv dynEnv1
  dynEnv1 |- $ VarName =&gt; Value
  ----------------------------------------------------
  dynEnv |- $ VarName =&gt; Value

we should write:

  statEnv |- VarName of var expands to expanded-QName
  dynEnv.varValue(expanded-QName) = #IMPORTED(URI)
  URI =&gt;module_dynEnv dynEnv1
  dynEnv1.varValue(expanded-QName) = Value
  ----------------------------------------------------
  dynEnv |- $ VarName =&gt; Value

- Jerome and Michael

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5066</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-21 01:00:50 +0000</bug_when>
    <thetext>I agree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5139</commentid>
    <comment_count>3</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-07-22 15:58:17 +0000</bug_when>
    <thetext>The working group as accepted your proposed resolution as amended.
- Jerome
On behalf of the XML Query and XSL WGs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5140</commentid>
    <comment_count>4</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-07-22 16:01:03 +0000</bug_when>
    <thetext>The WGs have approved your comment and the following correction.

replace:

  statEnv |- VarName of var expands to expanded-QName
  dynEnv.varValue(expanded-QName) = #IMPORTED(URI)
  URI =&gt;module_dynEnv dynEnv1
  dynEnv1 |- $ VarName =&gt; Value
  ----------------------------------------------------
  dynEnv |- $ VarName =&gt; Value

by:

  statEnv |- VarName of var expands to expanded-QName
  dynEnv.varValue(expanded-QName) = #IMPORTED(URI)
  URI =&gt;module_dynEnv dynEnv1
  dynEnv1.varValue(expanded-QName) = Value
  ----------------------------------------------------
  dynEnv |- $ VarName =&gt; Value

- Jerome
On behalf of the XQuery and XSL WGs
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>