Subject: Re: [xsl] another quest From: "Helder da Rocha" <helder@xxxxxxxxxxxxxxxx> Date: Thu, 29 Aug 2002 08:58:51 -0300 |
> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] another quest, Alia Mikati | Thread | RE: [xsl] another quest, Jarno . Elovirta |
Re: [xsl] preceding-sibling reverse, David Carlisle | Date | RE: [xsl] preceding-sibling reverse, Michael Kay |
Month |