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

[Bug 2500] Predicate list evaluation

From: <bugzilla@wiggum.w3.org>
Date: Thu, 10 Nov 2005 13:48:37 +0000
To: public-qt-comments@w3.org
Message-Id: <E1EaCn7-0004w3-Fo@wiggum.w3.org>


           Summary: Predicate list evaluation
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: boehme@informatik.uni-leipzig.de
         QAContact: public-qt-comments@w3.org

For my understanding the spec don't clearly specify how predicates of a
predicate list are evaluated. What we have is:
"The value of the step consists of those items that satisfy the predicates."

So i see two possibilities (C be the set of context nodes of a step without
applied predicates):
1) each predicate is applied to C and the intersection of these results will be 
   the result of the step
2) the predicates are applied left to right and the result of one predicate
   evaluation is the context for the following predicate
Both possibilities are equal as long as no positional filter (position(),
first(), last(), numeric item) is used.
The only indication that case 2 is the right one is given in 3.2.4 with the examples
para[@type="warning"][5] and

Furthermore 2.3.4 states
"An implementation is permitted, however, to reorder the predicates to achieve
better performance...". This however could be misleading interpreted as
supporting case 1.

Therefore I would propose to clearly state how predicate lists are to be
evaluated and give a warning/hint in 2.3.4 that reordering of predicates is
dangerous if predicates with references to context positions are included.

Kind regards
Received on Thursday, 10 November 2005 13:48:42 UTC

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