[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Using keys in templates

Subject: RE: Using keys in templates
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 13 Jul 2004 17:37:52 +0100
RE:  Using keys in templates
> It's almost always better to specify exactly which nodes you want to
> process in an <xsl:apply-templates select=""/> then to either use ifs
> inside a template or a match on a template.

I don't agree. For example, the problem of deleting selected nodes from a
tree is best solved by using the identity template to apply templates to all
nodes in the tree, and then defining a "do nothing" template rule to process
the exceptions. The "push" model is useful because the rules for processing
each kind of node are associated with that node, and not with each of its
possible parents, and this applies just as much when the required action for
some kinds of nodes is a no-op.

Michael Kay

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.