Hi,<div><br></div><div>I'm a newbie in XQuery and i appreciate a answer to this doubt.</div><div><br></div><div>I store several XML documents in a Native XML Database (eXist).</div><div>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. </div>
<div><br></div><div>A</div><div> - 1.xml</div><div> - 2.xml</div><div>B</div><div> - 3.xml </div><div><br></div><div>I have his XQuery file:</div><div><br></div><div>FOR $x in collection("A","B")<br>
</div><div>WHERE ...</div><div>RETURN ?</div><div><br></div><div>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:</div><div><br></div>
<div><RESULTS></div><div><A>2.xml<A></div><div><B>3.xml</B></div><div></RESULTS></div><div><br></div><div>What should i put in the RETURN clause?</div><div><br></div><div>I can also have collections inside other collections...</div>
<div><br></div><div>Thanks in advance</div><div><br></div><div><br></div><div><br clear="all"><br>-- <br>Ricardo Queirós<br>
</div>