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

RE: Using apply templates vs using value-of select /for-each

Subject: RE: Using apply templates vs using value-of select /for-each
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 9 Apr 1999 12:56:56 +0100
select for each
Title: RE: Using apply templates vs using value-of select /for-each

> Looking at all the examples of XSL I have found/received,
> I've noticed that some people use "xsl:value-of select" and/or "xsl:for-each
> select" while others use "apply templates".

xsl:for-each works best where the structure of the document is fairly rigid (e.g. <BOOK> elements nested within a <BOOKLIST>); xsl:apply-templates works best where there are elements that can appear in many different contexts e.g. <FOOTNOTE>. I think that "apply templates" can do everything that "for each" can do, but "for each" may be more readable in those circumstances where it works.

Mike Kay

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.