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 5840 - [XSLT 2.1] Enhancements to pattern syntax
Summary: [XSLT 2.1] Enhancements to pattern syntax
Status: CLOSED DUPLICATE of bug 5464
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
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: 2008-07-08 07:47 UTC by Michael Kay
Modified: 2014-05-15 14:00 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2008-07-08 07:47:19 UTC
(Captured en-passant during a WG telcon)

There are a number of restrictions on patterns that don't really have any good justification. This was an area we left largely untouched in 2.0 except where we automatically inherited changes being made to XPath expressions.

Constructs that would often be useful in patterns include:

* parentheses:  (//title)[1]

* union in a step:  (chapter|appendix)/title

* anchoring the pattern to a specific document:

       $lookup-doc//entry
       doc('lookup.xml')//entry

* matching any node that is a member of a preselected node-set 

       $preselection

* use of "." with a predicate:

       .[f:is-special(.)]

All of these can currently be expressed, but often rather inelegantly; the 4th case above, for example, is match="node()[. intersect $preselection]".
Comment 1 Michael Kay 2008-09-26 13:22:07 UTC

*** This bug has been marked as a duplicate of bug 5464 ***