Re: [xsl] Applying a Default Template

Subject: Re: [xsl] Applying a Default Template
From: Neil Beddoe <Neil.Beddoe@xxxxxxxxxxx>
Date: Tue, 30 Nov 2010 22:14:58 +0000
Thanks. That's just the nice neat answer I'm looking for. 

Sent from my iPhone

On 30 Nov 2010, at 15:46, "Ruud Grosmann" <r.grosmann@xxxxxx> wrote:

> 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
> 

.

This message is intended only for the use of the person(s) to whom it is addressed. It may contain information which is privileged and confidential. Accordingly any unauthorised use is strictly prohibited. If you are not the intended recipient, please contact the sender as soon as possible.

It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing Marble Bar Asset Management LLP's  terms and conditions of business or client agreement letter. Any comments or statements made herein do not necessarily reflect those of Marble Bar Asset Management LLP.

Marble Bar Asset Management LLP is regulated and authorised by the FSA.

Current Thread