[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: Matthew MacKenzie <matt@xxxxxxxxxxxxxxx>
Date: Thu, 08 Apr 1999 19:52:46 -0300
select foreach
Douglas,
  As an XSL newbie, I have learned the hard way that you cannot nest
xsl:for-each within xsl:template, which works opposite to what I am used
to having come to XMl with a perl perspective.
  xsl:foreach is great if you just need to display a lot of static
records with not a whole lot of complex operations being done (ie:
something like a corporate phone database).
  The xsl:apply-templates aproach that you are seeing allows you to
perform more intense operations on the xml.  I am sure I will not have
to describe what I mean here too much...just take an afternoon and play
with making links and stuff like that display in a manner which is not
trivial, you will soon understand what I mean.
  I started working with this stuff about a week ago, and I have been
concerned only with the IE5 side of it all, although I did play with XT
for a few minutes.  You are welcome to the xsl,xml that I have been
playing with if you want to understand what I mean, just let me know.
__
Matthew MacKenzie
www.cartnetwork.com



Douglas Nehring wrote:
> 
> Yet another question...
> 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".  I tried a couple of simple examples myself
> and was able to achieve the same results using both methods.
> 
> Is any one way "better" than the another (i.e. better supported by parsers,
> etc)?  Can you do some things with one that you can't do with the other?
> Are there any examples of this?
> 
> If this has been covered in a previous thread, please let me know and I'll
> check the archives for it again.
> 
> Regards,
> 
> Doug Nehring
> Nortel Networks
> MSL-100 Advanced Technology
> Richardson, TX
> (972) 685-2096, ESN 445-2096
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.