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

XSL : Selecting nodes

Subject: XSL : Selecting nodes
From: "Ram San" <lak_ram@xxxxxxxxx>
Date: Fri, 22 Jun 2001 14:27:58 -0500
warninglabel
 Hi all 

I am trying to get the unique country and then based on the countryset I have to put it in a block for each country...
to start with I tried doing ...
<xsl:variable name="countries" select="WarningLabel/Country[not(. = following::WarningLabel/Country)]"/>
	<xsl:for-each select="$countries">
	Country = <xsl:value-of select="$countries"/>
	</xsl:for-each>
I am getting the same country value for each of the warning label...eventhough I have two different values...
Can some tell me why I am getting this and how to rectify it..
input:

<CountrySID>
	<WarningLabel>
		<Country>US</Country>
		<Value>true</Value>
	</WarningLabel>
	<WarningLabel>
		<Country>UK</Country>
		<Value>false</Value>
	</WarningLabel>
	<Currency>
		<Country>US</Country>
		<Value>USD</Value>
	</Currency>
	<Currency>
		<Country>UK</Country>
		<Value>Pound</Value>
	</Currency>
</CountrySID>
--Output I want is 

<CountrySID>
		<Country>US</Country>
		<WarningLabel>
			<Value> true</Value>
		</WarningLabel>
		<Currency>
			<Value>USD</Value>
		</Currency>
	</CountrySID>
	<CountrySID>
		<Country>UK</Country>
		<WarningLabel>
			<Value> false</Value>
		</WarningLabel>
		<Currency>
			<Value>Pound</Value>
		</Currency>
	</CountrySID>


Thanks
ram


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

 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.