[xquery-talk] List subcollections

ricardo queiros ricardo.queiros at gmail.com
Thu May 21 13:44:44 PDT 2009


I will submit the question in the eXist mailing-list.
My apologies for the wrong location of the post.

Thanks.

2009/5/21 Michael Kay <mike at saxonica.com>

>  There's no such thing as a subcollection in standard XQuery.
>
> Your namespace prefix xmldb hints that you are using vendor extensions, so
> I suggest you ask on a list that's specific to your chosen XQuery
> implementation.
>
>
> Regards,
>
> Michael Kay
> http://www.saxonica.com/
> http://twitter.com/michaelhkay
>
>  ------------------------------
> *From:* talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] *On
> Behalf Of *ricardo queiros
> *Sent:* 21 May 2009 12:23
> *To:* talk at x-query.com
> *Subject:* [xquery-talk] List subcollections
>
> Hi to all,
> I want to list all the content (documents and subcollections) of a specific
> collection:
> I'm using the following query:
>
>  let $host := 'http://localhost:8080'
> let $col := xmldb:xcollection('/db')
> for $p in $col
> let $title := document-uri($p)
> let $id := substring(document-uri($p),5,string-length(document-uri($p))-8)
>  return <p><a href='{$host}/{$id}'>{$title}</a></p>
>
>
> This way i only list the documents of a specific collection.
> How can i list the subcollections?
>
>
> Thanks in advance!
>
>
>
> --
> Ricardo Queirós
>
>


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


More information about the talk mailing list