W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2012

[Bug 17600] Range predicates

From: <bugzilla@jessica.w3.org>
Date: Tue, 26 Jun 2012 12:20:50 +0000
Message-Id: <E1SjUlG-0001O2-Br@jessica.w3.org>
To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17600

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike@saxonica.com

--- Comment #1 from Michael Kay <mike@saxonica.com> 2012-06-26 12:20:52 UTC ---
The proposed syntax was in an early draft of XQuery and was removed because the
semantics are so convoluted. To retain orthogonality, we have to allow any
sequence of integers to be used as a predicate, and then we get issues about
what happens when the integers in this sequence are not monotonically
increasing or contain duplicates, and messy problems if the predicate is
supplied in a form such as [1 to @max] where the value of @max depends on the
context item. It's not hard to write [position() = 1 to 10] and I suggest we
leave it that way.

However, there's another form of range predicate that would be very useful,
namely selecting all items in a sequence up to (and optionally including) the
first one that satisfies some condition: something like

$sequence [[from|after]] condition [[to|before] condition]]

including the possibility of

$sequence from position()=3 to position()=5

but more usefully things like

$sequence before self::h1

or

$sequence after self::h1 before self::h2

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 26 June 2012 12:20:58 UTC

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