Subject: RE: How can I checking whether any one of my inter table contain border attribute
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Thu, 23 Sep 2004 14:56:31 +0300
|
Hi,
> Ihave the following xhtml
> <table>
> <tr>
> <td>
> <table border="1">
> </table>
> </td>
> <td>
> <table>
> <tr>
> <td>
> <table border="1">
> </table>
> </td>
> </tr>
> </table>
> </td>
> </tr>
> </table>
> How can I checking whether any one of my inter table contain border
> attribute and I want to retrieve that value
>
> I tried the following template .But it is not working
> <xsl:if test="ancestor::table/@border">
> </xsl:if>
This will check if the current node has an ancestor table what has a border
attribute. descendant::table/@border will give you a node-set of the border
attributes, use test="descendant::table/@border" instead of the above test,
and <xsl:value-of select="descendant::table/@border"/> will give you the value
of the first @border in document order.
Cheers,
Jarno
|