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 4979 - [XSLT 2++] Enhancement: declare default identity template
Summary: [XSLT 2++] Enhancement: declare default identity template
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Recommendation
Hardware: PC Windows XP
: P2 enhancement
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: 2007-08-23 13:38 UTC by Michael Kay
Modified: 2010-04-28 18:57 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2007-08-23 13:38:54 UTC
During discussion of streaming use cases, the XSL WG identified that it would help both users and implementors if the stereotypical use of the identity template to override the standard built-in template(s) could be expressed more declaratively.

For example, one might have an attribute at xsl:stylesheet level, or a per-mode declaration such as

<xsl:mode name="mode-name"
  default-action="copy|copy-text|delete|continue|error"/>

where "copy-text" is the current default (copy text nodes only, drop everything else), "copy" means copy all nodes (the so-called identity template), "delete" means delete the entire subtree rooted at the node, "continue" means apply-templates to the children, and "error" means throw a dynamic error; with the default applying to the named mode or in the absence of a mode-name to the default mode.

It was also noted that a common stereotype for the default template is to rename elements, and perhaps we should also provide for this.
Comment 1 Sharon Adler 2007-10-10 19:33:39 UTC
Considered as an enhancement request for VNext
Comment 2 Sharon Adler 2010-04-28 18:57:27 UTC
done - to be closed.