This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
matching nodes by their value
- To: <xsl-list at mulberrytech dot com>
- Subject: matching nodes by their value
- From: "Jonas" <bob at centras dot lt>
- Date: Wed, 16 Aug 2000 13:21:26 +0200
- Reply-To: xsl-list at mulberrytech dot com
Hello,
there is such structure of html:
<table>
<tr>
<td>...</td>
<td><a ...>something</a></td>
</tr>
<tr>...</tr>
...
</table>
All <tr> nodes have the same structure.
I need to select all <tr> nodes which second <td> node's <a> value
starts with some string, which is passed to stylesheet as parameter.
I wrote such template:
<xsl:template match="table">
....
<xsl:for-each select="tr/td/a[starts-with(tr/td/a,$string)]">
<xsl:apply-templates select="child::tr"/>
</xsl:for-each>
</xsl:template>
and its not selecting the needed nodes,
what have I done wrong in for-each select?
or this should be done other way?
Thanks,
Jonas.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list