This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: using few or many templates?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]