[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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

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
Keywords
xsl