use xdmp:eval

http://docs.marklogic.com/xdmp:eval

Like this

xdmp:eval( ' for $i in xdmp:directory("/docs/shared/") return document-uri($i)' 
, (),
           <options xmlns="xdmp:eval">
                                    
<database>{xdmp:database("otherdb")}</database>
                                  </options>)




-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of sini narayanan
Sent: Monday, June 17, 2013 9:15 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] get files uner xdmp:directory from Modules 
database

Hi All,

I want to get the doc uri of all the files in a particular xdmp:directory 
/docs/shared/.
I can do this as below if I'm executing the query from the same DB having the 
folder structure.

for $i in xdmp:directory("/docs/shared/") return document-uri($i)


But how do I get the files under the directory /docs/shared/ from a particular 
DB's modules database?


Thanks,
Sini
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to