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 1827 - Range expression: "1 to1" specified to evaluate to "(1, 1)"
Summary: Range expression: "1 to1" specified to evaluate to "(1, 1)"
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 2.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Don Chamberlin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-31 15:37 UTC by Frans Englich
Modified: 2005-08-30 16:51 UTC (History)
0 users

See Also:


Attachments

Description Frans Englich 2005-07-31 15:37:53 UTC
Hello,

The description of the Range expression reads(3.3.1):

"[...] Otherwise, the result is a sequence containing the two integer operands 
and every integer between the two operands, in increasing order."

According to my interpretation, the expression "1 to 1" should hence evaluate 
to the sequence "(1, 1)", since that is the two integer operands and every 
integer between the two operands(which is none).

However, one of the examples shows that with two identical operands the result 
should be a singleton value identical to the operands; "This example constructs
a sequence of length one containing the single integer 10. // 10 to 10"

I think the pararaph describing the range expressions contradicts the example,
and that it should be changed wrt. to the scenario when the two operands are
identical.


Cheers,
Frans
Comment 1 Don Chamberlin 2005-08-30 16:51:13 UTC
Frans,
Thanks for this suggestion. I have clarified the definition of a range 
expression by adding the following sentence:
"If the two operands convert to the same integer, the result of the range 
expression is that integer."
The descriptive text on range expressions is now consistent with the examples. 
Since this change is based directly on your suggestion, I am closing this bug 
report. If you have any additional concerns or questions, please reopen the 
report.
Regards,
Don Chamberlin