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]

matching nodes by their value


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

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