[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>

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

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" />

< 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" />

 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 

More information about the talk mailing list