cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tapan Nanawati" <tapan_nanaw...@yahoo.com>
Subject selecting / displaying only one node value out of the many identical values
Date Thu, 01 Mar 2001 20:48:25 GMT
I am  not sure if this is basic question but even a hint in the form of
statement  / query may be of help.

I have an XML like this


<?xml version="1.0" encoding="UTF-8"?>
<clothes>
<category name="shirts">
	<sno times="1">
		<brand>Arrow</brand>
		<size>X-L</size>
		<color>red</color>	</sno>

	<sno times="2">
		<brand>Arrow</brand>
		<size>Med</size>
		<color>blue</color>	</sno>

	<sno times="3">
		<brand>Arrow</brand>
		<size>L</size>
		<color>red</color>	</sno>

	<sno times="4">
		<brand>Lee</brand>
		<size>X-L</size>
		<color>green</color>	</sno>
</category>
</clothes>

this XML is genereted based on query from a user and comes from a database.
I want to display to the user only  the available "brands"  of shirts
Ie. output shall be only
"Arrow" and "Lee" in my case. and the user can then  further query on the
subitems like "size" and "color". SO I want a
< Select "brand"  from "clothes/category/sno" where "there is no repetiion"
>  (:-)
sort of query. I hope I could make myself clear.
what XSL query can I write for this!
Thanks for the attenttion

Tapan Nanawati
tapan_nanawati@yahoo.com
91-11-6685274 (o)
91-98112-98982 (m)
New Delhi - INDIA
------------------------------
God is real, unless declared integer.



Mime
View raw message