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

[Bug 29355] Modernize sequence filtering

From: <bugzilla@jessica.w3.org>
Date: Sun, 10 Jan 2016 22:11:18 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29355-523-mjWK56yRvG@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29355

Michael Kay <mike@saxonica.com> changed:

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

--- Comment #5 from Michael Kay <mike@saxonica.com> ---
The decision not to allow SEQ[2 to 5] was made about 10 years ago so my
recollection of the exact rationale may be faulty. 

The biggest problem with A[B] is its overloading as both a filter expression
and a subscripting expression. To make it work as a filter expression, B must
be evaluated once for each item in A, with that item as the context item. That
rule can't depend on the type of B, because we can't assume static typing.
Hence the convoluted rule whereby A[3] is interpreted as the filter expression
A[position() = 3].

If you extend this kind of logic to handle predicates with a type other than a
single integer, then things get increasingly complicated, because you have to
define how things like A[. to 15] should be interpreted: evaluating the
predicate once for each item in A no longer works.

It's very intuitive what A[2 to 5] should mean, but defining the semantics in a
way that covers all edge cases and still remains comprehensible (and
implementable) for more complex cases proves quite difficult.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Sunday, 10 January 2016 22:11:21 UTC

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