> I wanna select all rows from the second rowSet, whose
> parentIDs are not equal to any row id from the first
> rowSet. In this example, it'd be rows 3 and 6:
>
> <rowSet id="1">
> <row id="1"/>
> <row id="2"/>
> </rowSet>
>
> <rowSet id="2">
> <row id="3"/>
> <row id="4">
> <parentID>1</parentid>
> </row>
> <row id="5">
> <parentID>2</parentid>
> </row>
> <row id="6">
> <parentID>3</parentid>
> </row>
> </rowSet>
>
>
> I'm trying the following code, but it's not working.
> All rows from the second rowSet are selected.
>
> <xsl:variable name="firstRowSet"
> select="rowSet[@id=1]/row"/>
> <xsl:variable name="secondRowSet"
> select="rowSet[@id=2]/row"/>
>
> <xsl:for-each
> select="$secondRowSet[parentID!=$firstRowSet/@id]">
> ...
rowSet[@id = 2]/*[not(parentID = ../preceding-sibling::rowSet[1]/row/@id)]
Cheers,
Jarno - SITD: Snuff Machinery (Club Version)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|