[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: António Mota <amsmota@xxxxxxxxx>
Date: Fri, 21 Jan 2005 12:02:14 +0000

Try to define a "do-nothing" template for <code>

<xsl:template match = "code"/>

(i'm not following this thread so this is just from the top of my head)




On Fri, 21 Jan 2005 12:54:46 +0100, rd.contact@xxxxxxx
<rd.contact@xxxxxxx> wrote:
> I thank you for your assistance, but I need something that imports all nodes
> inside the table and remove all nested <code> tags before replacing all by a
> global <code>
> 
> ie:
> <table bgcolor="blue">
> <tr>
>  <td>
>   <code>
>    a
>     <code>b</code>
>     <p>hello</p>
>   </code>
>   c
> </...>
> 
> must return <code>a b<p>hello</p></code>
> 
> I think
> 
>  <xsl:template match = "table[@bgcolor='blue']">
>    <code>
>     <xsl:apply-templates/>
>    </code>
>  </xsl:template>
> 
> will not remove <code(s)> inside <table>
> 
> and
>  <xsl:template match="table[@bgcolor='blue']">
>   <code><xsl:value-of select="."/></code>
>  </xsl:template>
> 
> will remove all nodes (<br>, <font> ...)


Current Thread