W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2005

[Bug 1523] [FO] fn:subsequence and negative start position

From: <bugzilla@wiggum.w3.org>
Date: Sun, 10 Jul 2005 22:23:52 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1DrkDI-0000Py-3N@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1523





------- Additional Comments From mike@saxonica.com  2005-07-10 22:23 -------
On rereading this text, it occurs to me that there's nothing in the either the
old or the new version that states unequivocally that the order of items in the
result is the same as the order in the input (which I believe is true even in
unordered mode). This can be fixed by changing the rules to:

RULES

In the two-argument case, returns 

$sourceSeq[fn:round($startingLoc) le position()] 

In the three-argument case, returns 

$sourceSeq[fn:round($startingLoc) le position() and position() lt
fn:round($startingLoc) + fn:round($length)]

Since we get many questions about it, it might also be worth adding a

NOTE

The reason the function accepts arguments of type xs:double is that many
computations on untyped data return an xs:double result; and the reason for the
rounding rules is to compensate for any imprecision in these floating-point
computations.
Received on Sunday, 10 July 2005 22:23:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:25 UTC