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 5449 - [XSLT 2++] Enhancement: apply-templates to atomic values
Summary: [XSLT 2++] Enhancement: apply-templates to atomic values
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Working drafts
Hardware: PC Windows XP
: 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-02-05 11:06 UTC by Michael Kay
Modified: 2014-05-15 14:00 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2008-02-05 11:06:41 UTC
This is motivated by a suggestion from Andre Cusson on xsl-list, 2008-02-03.

It would be a useful generalization of the XSLT processing model to allow apply-templates on atomic values. It is currently restricted to nodes. This would allow a capability similar to typeswitch in XQuery, but with the advantages of dynamic despatch (including the ability to override rules in a customization layer, for example). It would effectively give XSLT polymorphism over atomic types as well as over node types. 

This would require extension of XSLT patterns to be able to match atomic values by type. A possible syntax might be match="type(AtomicType)".

The existence of such patterns would also be useful in the group-starting-with and group-ending-with attributes of xsl:for-each-group, which are currently restricted to use when grouping sequences of nodes.
Comment 1 Sharon Adler 2010-04-22 11:00:25 UTC
This bug is to be closed as the function was included in the First WD of XSLT 2.1.