Re: [xsl] using few or many templates?

Subject: Re: [xsl] using few or many templates?
From: Larry Garfield <lgarfiel@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 17 Mar 2001 00:04:49 -0600
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@xxxxxxxxxxxxxxxxxxx

Do you have a PalmOS Organizer?  Click here to add me to your address
book:
http://signature.coola.com/?lgarfiel@xxxxxxxxxxxxxxxxxxx

-- "If at first you don't succeed, skydiving isn't for you." :-)



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


Current Thread