W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2016

[Bug 29355] Modernize sequence filtering

From: <bugzilla@jessica.w3.org>
Date: Thu, 07 Jan 2016 16:01:22 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29355-523-iT33LuGzgW@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29355

--- Comment #2 from Benito van der Zander <benito@benibela.de> ---
>This would introduce a backwards-compatibility issue. It is currently legal syntax and code and examples exists that exploit the fact that zero and negative values return the empty sequence.

Yeah that is sad :(


But it could be done for arrays. 
It is surprisingly inconsistent that they allow ?(2 to 4), but raise errors on
invalid indices

>This I'd like, but I believe with XPath 2.0 there was a strong reason to disallow sequences of more-than-one in predicates 

But is that reason still true? Especially with those arrays

I do not see an issue, if more-than-one sequences are restricted to type
integer+

>Note: you can already do the following, which gives what you want and is shorter than your alternative syntax: $sequence[position() = 2 to 4]

For positive indices

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 7 January 2016 16:01:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:57 UTC