This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

XSL : Selecting nodes


 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]