<?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>8537</bug_id>
          
          <creation_ts>2009-12-22 21:47:17 +0000</creation_ts>
          <short_desc>[XQuery] computed attribute constructor issue raise by XQTS Bug #8480</short_desc>
          <delta_ts>2010-02-17 19:48:21 +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>XQuery 1.0</component>
          <version>Proposed Edited Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</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="Andrew Eisenberg">andrew.eisenberg</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</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>30232</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2009-12-22 21:47:17 +0000</bug_when>
    <thetext>Bug #8480 is concerned with a new test case written to cover erratum XQ.E19 and an older test case that is almost identical that returns a different error.

The new query is:

&lt;result&gt;{attribute {&quot;xmlns:error&quot;} {}}&lt;/result&gt;

In 3.7.3.2 Computed Attribute Constructors we say:

If the keyword attribute is followed by a name expression, the name
expression is processed as follows:

   1)
   .
   .
   .
   3) ... If conversion of the atomized name expression to an
      expanded QName is not successful, a dynamic error is raised
      [err:XQDY0074].


A static error is raised [err:XQST0044] if the node-name of the constructed attribute node has any of the following properties:

    * Its namespace prefix is xmlns.
    * ...


The text introduced by XQ.E19 seems to have two problems:

- it is raising a static error after the attribute node is constructed
- the construction of the attribute fails, because xmlns is not defined in our statically known namespaces, and so the new text will never be considered</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32201</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-02-16 19:05:32 +0000</bug_when>
    <thetext>Erratum XQ.E19 does not accurately reflect the resolution of Bug 4463. 

I need to fix this in both the erratum and in the XQuery specification (2ed and 1.1). That will fix the static / dynamic error problem.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32202</commentid>
    <comment_count>2</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2010-02-16 19:10:25 +0000</bug_when>
    <thetext>After WG discussion I now believe that the second problem I reported does not exist. The following query should return a dynamic error (we say XQST0044 now):

&lt;result&gt;{attribute {fn:QName(&quot;foo&quot;, &quot;xmlns:error&quot;)} {}}&lt;/result&gt;
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>