[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Testing against node-set

Subject: RE: Testing against node-set
From: Jarno.Elovirta@xxxxxxxxx
Date: Thu, 6 Feb 2003 16:45:43 +0200
snuff machinery download
> 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.