Re: [xsl] Applying a Default Template

Subject: Re: [xsl] Applying a Default Template
From: Ruud Grosmann <r.grosmann@xxxxxx>
Date: Tue, 30 Nov 2010 16:47:43 +0100
On 11/30/10 15:59, Neil Beddoe wrote:
HI,

I'm transforming some data into XHTML and I was wondering if there's a way to apply a template that adds a default format before applying another template that applies more specific format.

Hi Neil, you can use xsl:next-match if you don't want to use modes

<xsl:template match="row/*" priority='1'>
<!-- because of priority, this one takes precedence over the specific money template -->
<td><xsl:next-match/></td>
</xsl:template>


<xsl:template match="money">
<span class="money" onclick="ShowMeMoney()">
<xsl:value-of select="."/>
</span>
</xsl:template>

regards, Ruud

Current Thread