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 02:16:30 -0600
- Organization: DePaul University
- References: <NEBBLOGPODFIFNJHLHBGMECFCCAA.elenz@xyzfind.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
One addendum. I personally tend to use <xsl:apply-templates /> rather than
<xsl:value-of select="." />. That way, it also catches any tags under the
current node, if there are any, and simply copies the text just as value-of
does. Either one works equally well in this case, it's just a stylistic
difference.
Evan Lenz wrote:
> <xsl:template match="A">
> <table>
> <xsl:apply-templates/>
> </table>
> </xsl:template>
>
> <xsl:template match="B | C">
> <tr><td><xsl:value-of select="."/></td></tr>
> </xsl:template>
>
> <xsl:template match="E">
> <tr><td></td><td><xsl:value-of select="."/></td></tr>
> </xsl:template>
>
> <xsl:template match="G">
> <tr><td></td><td></td><td><xsl:value-of select="."/></td></tr>
> </xsl:template>
>
> Anyway, this balance has been discussed here before. Here's a link to one of
> the more recent threads:
> http://www.biglist.com/lists/xsl-list/archives/200102/threads.html#01737
>
> Evan Lenz
> XYZFind Corp.
>
> 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