Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - >Thread Next - Re: [xsl] Almost identical templates Almost identical templatesTo: Date: 7/1/2004 10:46:00 AM I have the following template in my stylesheet:
<xsl:template match="TOC">
<div class="section">
<span class="ref">TOC</span><br />
<xsl:apply-templates select="*|text()" />
</div>
</xsl:template>
I also have:
<xsl:template match="HEADER">
<div class="section">
<span class="ref">HEADER</span><br />
<xsl:apply-templates select="*|text()" />
</div>
</xsl:template>
Infact I have quite a few of these almost identical templates, is there
a way I could do this
<xsl:template match="*">
<div class="section">
<span class="ref">***MAGIC***</span><br />
<xsl:apply-templates select="*|text()" />
</div>
</xsl:template>
Where ***MAGIC*** picks out the tag name that it matched on?
I'm sure that this can be done but my brain is not working at present. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
