Hi Huib Verweij,
Thanks for the reply,but I have a small problem with your approach I don't have a criteria with which I can select my required docs with in collection,I get my required doc names from outside and with those names only I need to search the collection.
Thanks & regards Sateesh.A
-----Original Message----- From: Huib Verweij [mailto:hhv@home.nl] Sent: Saturday, September 08, 2012 5:06 PM To: sateesh Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Individual docs from collection
Hi Sateesh,
Op 8 sep. 2012, om 12:27 heeft sateesh het volgende geschreven:
I have created a collection with 10k xml files and now on that collection
I want to write query on few xml's only .could you please suggest how this functionality is achieved.
Thanks & Regards Sateesh.A
what I always do is use an XQuery that selects the documents by some criterium, then process them further, e.g.
for $doc in collection('foo')/rootelement[@type='selectedtype'] let $name := $doc/name (: f.i.: ) etc...
or if you want you can assign the docs to a variable (handy if you want to process the set multiple times f.i.):
let $docs := collection('foo')/rootelement[@type='selectedtype']
Hartelijke groet, Huib Verweij