|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: another quest
> Hi again,
> I have this xml file:
> <table>
> <tr>
> <td> tony </td>
> <td> 100 </td>
> </tr>
> <tr>
> <td> rony </td>
> <td> 99 </td>
> </tr>
> </table>
>
> I want to to search for "rony" to get the value of the following sibling
> (which is in this case 99). How can I do it in xsl???
> Thx
This gets just the "99":
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:strip-space elements="*" />
<xsl:output method="text" />
<xsl:template match="text()" />
<xsl:template match="td[normalize-space(.)='rony']">
<xsl:value-of select="normalize-space(following-sibling::td)" />
</xsl:template>
</xsl:stylesheet>
Helder.
--
Helder da Rocha (helder@xxxxxxxxxxxxxxxx)
Web Consultant
www.argonavis.com.br
São Paulo, Brazil
+55 (11) 9291 0567
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








