This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It seems that few parts of the text of function 'fn:subsequence' is incorrectly specified in the spec. This error seems to be present in both these documents: 1) XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition) 2) XPath and XQuery Functions and Operators 3.0 (Working Draft 14 December 2010) Below are possible discrepancies, and my view point of the correction, a) $sourceSeq[fn:round($startingLoc) le position()] should be, $sourceSeq[fn:round($startingLoc) ge position()] b) $sourceSeq[fn:round($startingLoc) le position() and position() lt fn:round($startingLoc) + fn:round($length)] should be, $sourceSeq[fn:round($startingLoc) ge position() and position() lt fn:round($startingLoc) + fn:round($length)] Ref: http://www.w3.org/TR/xpath-functions/#func-subsequence (chapter 15.1.10) http://www.w3.org/TR/xpath-functions-30/#func-subsequence (chapter 14.1.9)
I think the text is correct. We want to select the items whose position is at or beyond the starting location: that is position() ge $start (subject to rounding), or as the spec puts it, $start le position().
Thanks, Mike for the explanation. I apologize for misreading the spec and reporting this bug. I'm marking this bug report as invalid. Thanks.
Closed as the originator indicated acceptance of the resolution