[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] replace table by one code tag


Subject: Re: [xsl] replace table by one code tag
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Fri, 21 Jan 2005 10:59:55 -0000

Try:
<xsl:template match = "table[@bgcolor='blue']">
  <code>
   <xsl:apply-templates/>
  </code>


</xsl:template>

HTH
Vasu
----- Original Message ----- 
From: <rd.contact@xxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, January 21, 2005 10:51 AM
Subject: [xsl] replace table by one code tag


> Hi,
>
> I want to replace all HTML <table> with attribute bgcolor="blue" by
> <code></code> tags. But if the table contains <code>, I want the result to
have
> only one <code>
>
> ie :
> <table bgcolor="blue"><tr><td><code>a<code>b</code></code>c</...>
> or
> <table bgcolor="blue"><tr><td>abc</...>
> must return
> <code>abc</code>
>
> Any suggestion?
>
> regards,
> Steve


Current Thread