This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: using few or many templates?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] using few or many templates?
- From: Larry Garfield <lgarfiel at students dot depaul dot edu>
- Date: Sat, 17 Mar 2001 00:04:49 -0600
- Organization: DePaul University
- References: <20010317053652.67565.qmail@web12603.mail.yahoo.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
As a general rule, in XSLT it's better to err on the side of modularity,
meaning use multiple templates. The advantage is that you can swap out
different templates easily, making the stylesheet more modular and easier
to maintain. It's also easier to read that way, both for you and for
other people. It's the same logic behind lots of simple, streamlined
functions vs. one big all-encompassing function, with most of the same
trade-offs.
Dan Diebolt wrote:
<snippet snip>
> Note the first xsl fragment used no apply-templates and
> the second fragment used multiple apply-templates.
> My question to the list is this: As a matter of style, how
> do you trade off these two extremes in coding? From the
> simple to most complex situation, the issue of how to
> factor your template usage must repeatedly come up.
> How do you deal with this?
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
--
Larry Garfield
lgarfiel@students.depaul.edu
Do you have a PalmOS Organizer? Click here to add me to your address
book:
http://signature.coola.com/?lgarfiel@students.depaul.edu
-- "If at first you don't succeed, skydiving isn't for you." :-)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list