[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

List subcollections

Michael Kay mike at saxonica.com
Thu May 21 13:41:36 PDT 2009


  List subcollections
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: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf
Of ricardo queiros
Sent: 21 May 2009 12:23
To: http://x-query.com/mailman/listinfo/talk
Subject:  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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090521/39e609bb/attachment.htm


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.