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 12672 - [FS] Abbreviated Syntax normalization for AttributeTest
Summary: [FS] Abbreviated Syntax normalization for AttributeTest
Status: ASSIGNED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: 2nd Edition Recommendation
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Michael Dyck
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-17 17:02 UTC by Jonas B
Modified: 2011-05-17 19:14 UTC (History)
0 users

See Also:


Attachments

Description Jonas B 2011-05-17 17:02:50 UTC
Please correct me if I'm mistaken but I don't see how the abbreviated axis normalization for attribute related node tests is reflected in the formal semantics.

In XPath an omitted axis specifier implies the child axis, but if there is a attribute related node test the attribute axis is implied. In the formal semantics it seems to always imply the child axis.

Following are the relevant sections of the mentioned documents (badly quoted for the lack of formatting options):


-- Section 3.2.4 (Abbreviated Syntax) of both XPath 2.0 and XQuery 1.0 --

2. If the axis name is omitted from an axis step, the default axis is child unless the axis step contains an AttributeTest or SchemaAttributeTest; in that case, the default axis is attribute.


-- Section 4.2.4 (Abbreviated Syntax) of Formal Semantics --

 [NodeTest]Axis 
       ==       
 child::NodeTest



Please note that this is not about the attribute axis abbreviation "@" but the attribute node test "attribute()".

Best regards,
  Jonas Bötel
Comment 1 Michael Dyck 2011-05-17 19:14:03 UTC
Yup, that's a bug.

The existing normalization rule should be split into two, one of them mapping to attribute::NodeTest.