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

RE: more on Using apply-templates instead of for-each?

Subject: RE: more on Using apply-templates instead of for-each?
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Tue, 15 Apr 2003 15:25:24 -0400
tom_tue
[Kathy Burke]

> Thank you Tom and Wendell...getting much clearer...
> 
> Tom, since you've also used value-of, may I assume this is 
> not a case where
> I can use apply-templates? Is that because I want the items 
> in table rows?
> 

Well, no, I just used as much of your code as possible.  You were just
displaying the text content, and that is the simplest way to do it.  If
you want to do more, you once again have to decide whether to do so
in-line or to invoke another template (and you might want to use
call-template instead of apply-templates, depending on the
circumstances).

Remember, simple is good, and so is being modular (i.e., using other
templates).  You want to try to make your code (yes, xslt is code!)
simple to understand and simple to modify, but the balance can shift
according to taste and circumstance.

I will often start out sketching a stylesheet using lots of value-ofs,
then later change them to apply-templates or call-templates as I fill in
the details.

Cheers,

Tom P

 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.