This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: following-sibling
- From: Jarno dot Elovirta at nokia dot com
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 10 Sep 2002 16:30:55 +0300
- Subject: RE: [xsl] following-sibling
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
> Hello again,
> I have this part of xml file and I wanna search in a row for
> the value ':
> 139597.1' and get its sibling 'Status: RONY'.
[snip]
> I'm using this xsl but not working. Plz can u tell me what's wrong?
> Thx again.
>
> ...
> <xsl:template match="body/center/table/tr/td/table/tr/td/small">
> <xsl:if test="contains(., ': 139597.1')">
> <b> Tar Status is : </b>
> <xsl:value-of select="normalize-space(following-sibling::tr
> [position() = 2]/td/small)"/>
> </xsl:if>
> </xsl:template>
<xsl:template match="body/center/table/tr/td/table/tr/td/small">
<xsl:if test="contains(., ': 139597.1')">
<b> Tar Status is : </b>
<xsl:value-of select="normalize-space(following::tr[2]/td[2]/small)"/>
</xsl:if>
</xsl:template>
You might want to do something about those match patterns, you could probably simplify them.
Jarno - having trouble finding anything fast enough to listen to, settling for Feindflug: Glaubenskrieg
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list