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

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

From: Michael Rys <mrys@microsoft.com>
Date: Thu, 7 Jul 2005 13:33:20 -0700
Message-ID: <BAE415CEAA831548800F68C44E905AF50292D05E@RED-MSG-60.redmond.corp.microsoft.com>
To: <bugzilla@wiggum.w3.org>, <public-qt-comments@w3.org>

Normally the rules are interpreted in order as they appear in the
document. So this should return "1".

Best regards
Michael

> -----Original Message-----
> From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
> request@w3.org] On Behalf Of bugzilla@wiggum.w3.org
> Sent: Thursday, July 07, 2005 1:29 PM
> To: public-qt-comments@w3.org
> Subject: [Bug 1523] New: [FO] fn:subsequence and negative start
position
> 
> 
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=1523
> 
>            Summary: [FO] fn:subsequence and negative start position
>            Product: XPath / XQuery / XSLT
>            Version: Last Call drafts
>           Platform: PC
>         OS/Version: Windows 2000
>             Status: NEW
>           Severity: normal
>           Priority: P2
>          Component: Functions and Operators
>         AssignedTo: ashok.malhotra@oracle.com
>         ReportedBy: abehm@ca.ibm.com
>          QAContact: public-qt-comments@w3.org
> 
> 
> The XTTF does not agree on the result of the following query:
> 
> fn:subsequence((1,2,3,4), -2, 4)
> 
> The result is determined by the following two statements:
> 
> "returns the items in $sourceString whose position $p obeys:
> fn:round($startingLoc) <= $p < fn:round($startingLoc) +
fn:round($length)"
> 
> which means -2 <= $p < 2
> 
> "If $startingLoc is zero or negative, the subsequence includes items
from
> the beginning of the $sourceSeq."
> 
> but it is not clear in which order the rules are applied to identify
> valid positions. We found two possible interpretations:
> 
> 1. apply the second rule first and define the valid positions as
> 1 <= $p < 5 such that the result is "1 2 3 4", or
> 2. define the valid positions first as -2 <= $p < 2 and start with
> position 1,
> such that the result is "1".
> 
> We have not reached agreement in the XQuery Test Task Force and ask
the
> Working Group for clarification.
> 
> On behalf of XTTF
> Andreas Behm
Received on Thursday, 7 July 2005 20:33:21 UTC

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