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 2720 - [FS] Wrong / operator precedence in PathExpr normalization rule
Summary: [FS] Wrong / operator precedence in PathExpr normalization rule
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Last Call drafts
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-16 21:46 UTC by Lionel Villard
Modified: 2006-10-19 22:57 UTC (History)
0 users

See Also:


Attachments

Description Lionel Villard 2006-01-16 21:46:47 UTC
The normalization rule for PathExpr is not consistent with the / operator
precedence, which is left-to-right. It should be written this way:

[RelativePathExpr / StepExpr]Expr == 
 fs:apply-ordering-mode (
 fs:distinct-doc-order-or-atomic-sequence (
   let $fs:sequence as node()* := [RelativePathExpr]Expr return
   let $fs:last := fn:count($fs:sequence) return
   for $fs:dot at $fs:position in $fs:sequence return
     [StepExpr]Expr))
Comment 1 Jerome Simeon 2006-01-28 17:03:05 UTC
I agree with the comment. The rewriting is clearer according to the
precedence rule. I do not believe this changes the actual dynamic or static 
semantics, but makes it clearer.
- Jerome
Comment 2 Jerome Simeon 2006-02-01 20:30:44 UTC
Note that the following rule:

[ StepExpr // RelativePathExpr ]Expr
==
[StepExpr / descendant-or-self::node() / RelativePathExpr]Expr

Should also be changed in a consistent way, to:

[ RelativePathExpr // StepExpr ]Expr
==
[ RelativePathExpr / descendant-or-self::node() / StepExpr ]Expr

- Jerome
Comment 3 Jerome Simeon 2006-02-14 16:32:53 UTC
The XSLT and XQuery WG have accepted your comments, and the issue will be fixed
by adopting the changes listed in comments #1 and #2.

Best regards,
- Jerome