This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8537 - [XQuery] computed attribute constructor issue raise by XQTS Bug #8480
Summary: [XQuery] computed attribute constructor issue raise by XQTS Bug #8480
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Proposed Edited Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-22 21:47 UTC by Andrew Eisenberg
Modified: 2010-02-17 19:48 UTC (History)
0 users

See Also:


Attachments

Description Andrew Eisenberg 2009-12-22 21:47:17 UTC
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:

<result>{attribute {"xmlns:error"} {}}</result>

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
Comment 1 Jonathan Robie 2010-02-16 19:05:32 UTC
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.

Comment 2 Andrew Eisenberg 2010-02-16 19:10:25 UTC
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):

<result>{attribute {fn:QName("foo", "xmlns:error")} {}}</result>