[Home] [By Thread] [By Date] [Recent Entries]
Hi List,
Not sure if I state this correctly, but here's what I am trying to achieve: Select all "row" nodes where the second cell contains "selected-id = $table-id". What I have is the following: <xsl:apply-templates select="twz:rows/twz:row[twz:cell/@selected-id = $car-id]" /> But that is clearly not working when the fourth cell with 'selected-id' is having a value equal to $car-id (see XML snippet below: more cells may have a "selected-id", only the second cell is important here) Now for something that surprised me. The following appeared to be working in TransformIIX (Gecko, client-side XSLT 1.0). Not sure it works with other xslt/xpath processors though. But I must say, it is mighty handy. <xsl:apply-templates select="twz:rows/twz:row[twz:cell[2]/@selected-id = $car-id]" /> From what I found on the web and on this list, it appears that subsequent bracketing (//node[cell][2][item][3]) is allowed, but nested bracketing not. Can someone shine some light on this? It works for me, but it gives me a bit of a strange feeling ;-) . Some people had some posts recently on positional grouping. I had some trouble understanding what was going on, but isn't this basically the same? The following is a legal variant, but does not actually do what I want: <xsl:apply-templates select="twz:row[twz:cell][2][@selected-id = $table-id]" />
Cheers, Abel Braaksma http://www.nuntia.nl
|

Cart



