<?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>1964</bug_id>
          
          <creation_ts>2005-09-02 00:24:51 +0000</creation_ts>
          <short_desc>[FS] technical: 5.14 Variable Declaration: missing type-check</short_desc>
          <delta_ts>2005-09-27 08:31:23 +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>5681</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-09-02 00:24:51 +0000</bug_when>
    <thetext>5.14 Variable Declaration

SCP / rule 2
    XQuery 4.14 says &quot;If a variable declaration includes both a type and
    an expression, the value returned by the expression must match the
    declared type...&quot;. Thus, this rule should have something like
        statEnv |- Expr : Type2
        Type2 &lt;: Type
    This will presumably involve splitting the rule into two, since the
    conclusion&apos;s &quot;(:= Expr | external)&quot; doesn&apos;t always provide a binding
    for Expr.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5722</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-09-06 15:36:36 +0000</bug_when>
    <thetext>Yes!

I thought I remember it was the way it was done. That&apos;s a good catch.

We should have the following two rules:

statEnv |- VarRef of var expands to Variable
statEnv |- Type = [SequenceType]sequencetype
statEnv1 = statEnv + varType( Variable =&gt; Type)
---------------------------------------------------------------------------
statEnv |- declare variable VarRef as SequenceType external =&gt;stat statEnv2

statEnv |- VarRef of var expands to Variable
statEnv |- Type = [SequenceType]sequencetype
statEnv |- Expr : Type2
statEnv |- Type2 &lt;: Type
statEnv1 = statEnv + varType( Variable =&gt; Type)
--------------------------------------------------------------------------
statEnv |- declare variable VarRef as SequenceType := Expr =&gt;stat statEnv2

- Jerome</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6474</commentid>
    <comment_count>2</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-09-27 08:31:08 +0000</bug_when>
    <thetext>The XSLT and XML Query Working Groups have accepted your comment and the
proposed resolution.
Best,
- Jerome</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>