This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: following-sibling


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]