This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24540 - Definition for predicate pattern and path patterns
Summary: Definition for predicate pattern and path patterns
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows NT
: P2 minor
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-05 22:55 UTC by Abel Braaksma
Modified: 2014-02-24 12:52 UTC (History)
1 user (show)

See Also:


Attachments

Description Abel Braaksma 2014-02-05 22:55:10 UTC
The introduction of predicate patterns is quite a major one, I think it is worthwhile to use a specific definition for this term. Same applies to its counterpart, path patterns.

I know we don't want to define every single term we use, but this one is quite important for understanding patterns.

In addition, I thought we once said that .[1] (or any numeric in a predicate pattern) is always true and .[0] is always false, but I couldn't find it, did that decision make it to the spec?
Comment 1 C. M. Sperberg-McQueen 2014-02-12 10:20:50 UTC
The WG discussed this during the ftf meeting in Prague and concluded that the issue should be left to the discretion of the editor.  There was some support for the view that definitions of 'predicate pattern' and 'path pattern' as terms would be helpful, even though (as was pointed out) they do not partition the set of all patterns between them.
Comment 2 Michael Kay 2014-02-24 12:51:24 UTC
I have introduced "predicate pattern" and "selection pattern" as defined terms for the two kinds of pattern; these now partition the space.

Concerning the last para of the bug report, the note in 5.6.3 has this information: "A predicate with the numeric value 1 (one) always matches, and a predicate with any other numeric value never matches. Numeric predicates in a PredicatePattern are therefore not useful, but are defined this way in the interests of consistency with XPath."