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

The comparison after inner for-each iterartion.

Subject: The comparison after inner for-each iterartion.
From: "Yogesh Dare" <yogeshd@xxxxxxxxxx>
Date: Tue, 1 May 2001 16:28:21 +0530
xsl inner for each
Hi,
I am using two for loops for node comaparison.
My xml is like this:

<Xml>
<Info>
	<Personnel>
	<Name first="Peter" last="Golf" />
	<Name first="Alex" last="John" />
	</Personnel>

	<Prof>
	<Name first="Mery" last="Joe" />
	<Name first="Andrew" last="Bush">
	</Prof>
</Info>
</Xml>

In my output I want to do like:
If <Name> child from <Personnel> node has same value of ' first' attribute
as in Prof/Name then Personnel/Name will not be written to output.
Now I do this using two for-each.
Here I first get first node form Personnel/Name and compare it with
Prof/Name nodes in one for-each loop.
There will be one more for-each to keep track of Personnel/Name nodes.

When I am finished with the all Prof/Name iteration then only I want some
value to return to indicate that match is found or not and not after each
node comparison.
I get the result after each node comparison which I don't want.

Please suggest if any imroved way to do this or some solution for my
approach.
Thanx,
Yogesh.




 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.