[xquery-talk] "XQuering"

Michael Kay mhk at mhk.me.uk
Sat Sep 17 10:25:13 PDT 2005


You can do this with a simple XPath 1.0 expression (and of course every
XPath expression is a valid query):
 
count(/root/item[subitem="X" and metaitem="Y"])
 
Michael Kay
http://www.saxonica.com/


  _____  

From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On Behalf Of
Elarrat, EFC
Sent: 17 September 2005 05:17
To: talk at xquery.com
Subject: [xquery-talk] "XQuering"


Hello everybody. Lately I've been trainning some xqueries and I guess I'm
learning a lot about it. But, as the novice I am, I need some help of you,
though. I tried to do a query, but I realized I couldn't do it with my
limited knowledge on the subject, so here I am.

What I'm trying to do is the following: 

I have this XML structure:
<root>
<item>
<subitem>textaboutsomething</subitem>
<metaitem>metatextaboutsubitem</metaitem>
</item>
</root>

And I would like to build a query that brings me the number of times that
the subitem X comes with the metaitem Y. Anybody could help me? Thanks
everybody for your big attention.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xquery.com/pipermail/talk/attachments/20050917/ee7d9f4d/attachment.htm


More information about the talk mailing list