[xquery-talk] Get collection context in XQuery

ricardo queiros ricardo.queiros at gmail.com
Fri Feb 6 11:32:58 PST 2009

I'm a newbie in XQuery and i appreciate a answer to this doubt.

I store several XML documents in a Native XML Database (eXist).
In my organisation i have several collections with several XML files that
share the same structure. The following structure defines 2 collections A
and B. The collection A have 2 XML files and the collection B one.

  - 1.xml
  - 2.xml
  - 3.xml

I have his XQuery file:

FOR $x in collection("A","B")

If, for example, only the 2.xml and 3.xml were evaluate for TRUE in the
WHERE clause, i want to obtain the following XML data:


What should i put in the RETURN clause?

I can also have collections inside other collections...

Thanks in advance

Ricardo Queirós
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090206/6b5abbf6/attachment.htm

More information about the talk mailing list