<?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>1787</bug_id>
          
          <creation_ts>2005-07-20 07:36:59 +0000</creation_ts>
          <short_desc>[FS] editorial: problems re VarRef, Variable</short_desc>
          <delta_ts>2007-01-16 17:46:48 +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>minor</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>4988</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-20 07:36:59 +0000</bug_when>
    <thetext>VarRef:
Other than in EBNF productions, all occurrences of &apos;VarRef&apos; are incorrect.
The only way that VarRef shows up in the grammar (XQuery or Core) is as
an alternative for PrimaryExpr. Thus, [4.1.2 Variable References] is the
only section where rules could legitimately use the symbol &apos;VarRef&apos;
(although they don&apos;t!). Everywhere else, &apos;VarRef&apos; is being misused.

Generally, it&apos;s used as an abbreviation for &quot;$VarName&quot;. But note that,
except in a PrimaryExpr context, &quot;$VarName&quot; is a variable binding or a
variable declaration, not a variable reference. So:

(1) In rules, when &apos;VarRef&apos; occurs in the context of an XQuery or Core
    expression, it should be changed to &quot;$VarName&quot;.

(2) In &apos;of var expands to&apos; judgments, the left-hand &quot;operand&quot; is a QName,
    not a VarRef or even a $VarName, so judgments like:
        VarRef of var expands to ...
    should be changed to:
        VarName of var expands to ...
    (leftover from last year, comment #007)

(3) The domain of varType is expanded-QName, not VarRef or $VarName or
    VarName.  So judgments like:
        statEnv + varType(VarRef =&gt; ...)
    should be changed to:
        VarName of var expands to expanded-QName
        statEnv + varType(expanded-QName =&gt; ...)
    (Or else with &apos;Variable&apos; instead of &apos;expanded-QName&apos;, see next.)
    (leftover from last year, comment #086)

Variable:
The symbol &apos;Variable&apos; is not a non-terminal, so it&apos;s not immediately clear
what it signifies. In practice, it&apos;s used where an expanded-QName would be
expected. Things would be simpler if you changed all occurrences of the
symbol &apos;Variable&apos; to &apos;expanded-QName&apos; (taking care in the few rules where
there&apos;s already a pattern by that name).
(leftover from last year, comment #008)

But, if you feel that the &apos;Variable&apos; symbol is preferable, then please
explicitly say that it&apos;s equivalent to &apos;expanded-QName&apos;, and use it
consistently. Specifically:

(1) Change &apos;expanded-QName&apos; to &apos;Variable&apos; in the following contexts:

    statEnv.varType(expanded-QName)
        2.1.5 / rule (2|4)
        4.1.2 / STA / rule 1

    dynEnv.varValue(expanded-QName)
        4.1.2 / DEv / rule (1|2)
        5.11 / DCP / rule 1

    VarName of var expands to expanded-QName
        2.1.5 / rule (2|4)
        3.1.1.1 / Notation
        4.1.2 / STA / rule 1
        4.1.2 / DEv / rule (1|2)

(2) Don&apos;t use the phrase &quot;expanded Variables&quot; because it makes Variables
    sound like QNames.

(3) In 5.15 / DCP / rule 2 / conclusion, change &quot;Variable&quot; to &quot;$VarName&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9103</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-04-10 14:59:02 +0000</bug_when>
    <thetext>Fixed as suggested.
- Jerome</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>