<div>I will submit the question in the eXist mailing-list.</div><div>My apologies for the wrong location of the post.<br></div><div><br></div><div>Thanks.<br><br><div class="gmail_quote">2009/5/21 Michael Kay <span dir="ltr">&lt;<a href="mailto:mike@saxonica.com">mike@saxonica.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



<div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">There&#39;s no such thing as a subcollection in standard 
XQuery.</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">Your namespace prefix xmldb hints that you are using vendor 
extensions, so I suggest you ask on a list that&#39;s specific to your chosen XQuery 
implementation.</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">
<p><font size="2">Regards,<br><br>Michael Kay<br><a href="http://www.saxonica.com/" target="_blank">http://www.saxonica.com/</a><br><a href="http://twitter.com/michaelhkay" target="_blank">http://twitter.com/michaelhkay</a> 
</font></p></font></span></div><br>
<blockquote dir="ltr" style="padding-left:5px;margin-left:5px;border-left:#0000ff 2px solid;margin-right:0px">
  <div lang="en-us" dir="ltr" align="left">
  <hr>
  <font face="Tahoma" size="2"><b>From:</b> <a href="mailto:talk-bounces@x-query.com" target="_blank">talk-bounces@x-query.com</a> 
  [mailto:<a href="mailto:talk-bounces@x-query.com" target="_blank">talk-bounces@x-query.com</a>] <b>On Behalf Of </b>ricardo 
  queiros<br><b>Sent:</b> 21 May 2009 12:23<br><b>To:</b> 
  <a href="mailto:talk@x-query.com" target="_blank">talk@x-query.com</a><br><b>Subject:</b> [xquery-talk] List 
  subcollections<br></font><br></div><div><div></div><div class="h5">
  <div></div>Hi to all,
  <div><br></div>
  <div>I want to list all the content (documents and subcollections) of a 
  specific collection:<br></div>
  <div>I&#39;m using the following query:</div>
  <div><br></div>
  <div>
  <div>let $host := &#39;<a href="http://localhost:8080" target="_blank">http://localhost:8080</a>&#39;</div>
  <div>let $col := xmldb:xcollection(&#39;/db&#39;)</div>
  <div>for $p in $col</div>
  <div>let $title := document-uri($p)</div>
  <div>let $id := 
  substring(document-uri($p),5,string-length(document-uri($p))-8)</div></div>
  <div>
  <div>return &lt;p&gt;&lt;a 
  href=&#39;{$host}/{$id}&#39;&gt;{$title}&lt;/a&gt;&lt;/p&gt;<br></div></div>
  <div><br clear="all"><br></div>
  <div>This way i only list the documents of a specific collection.</div>
  <div>How can i list the subcollections?</div>
  <div><br></div>
  <div><br></div>
  <div>Thanks in advance!</div>
  <div><br></div>
  <div><br></div>
  <div><br>-- <br>Ricardo Queirós<br></div></div></div></blockquote></div>
</blockquote></div><br><br clear="all"><br>-- <br>Ricardo Queirós<br>
</div>