[xquery-talk] leaf values

fatma helmy fatmahelmy2000 at yahoo.com
Sat Feb 11 09:02:29 PST 2006


Suppose I have the following xml
<book >
	<title>seven years in trenton</title>
	<price>12</price>

</book>
<book >
	<title> history of trenton</title>
	<price> 55</price>
</book>
<book >
	<title> trenton today, trenton tomorrow	</title>	
	<price> 55</price>
        <author> </author>
</book>
</bookstore>

suppose also , I have $p which contains the following
paths book/title , book/price,book/author. since title
and price are leaves and have values ,  I need for $I
in $p < select values of leaves nodes> such that the
result would be for example

< path= “book/price " >
<value- per-path  value="12" count="1" />
<value -per-path  value="55" count="2" />
</attr-per-path>

< path= “book/title" >
<value- per-path  value=" seven years in trenton "
count="1" />
<value -per-path  value=" history of trenton "
count="1" />
<value -per-path  value=" trenton today, trenton
tomorrow " count="1" />
</attr-per-path>

 I need this to be done for leaves only which contain
the data.




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the talk mailing list