Hey Christian,
Thanks for the response. fn:collection is handling as specified in the BaseX documentation, so I guess my question changes into: Is there a method to open a subset of documents (not distinguishable by path) in the database with performance similar to calling db:open($db_name)?
Thanks,
Jeremy
On Thu, Oct 17, 2013 at 1:44 AM, Christian Grün christian.gruen@gmail.comwrote:
Hi Jeremy,
it’s somewhat surprising, but XQuery itself has no database semantics. This is the reason why the implementation of fn:collection is pretty much implementation-defined [1]. In BaseX, the function checks if the specified URI matches a database. If negative, the URI will be resolved against the file system. I’m not sure why it didn’t turn out to do so in your scenario, but I’m pretty sure you’ll find some answers in our Wiki article on BaseX databases [2]. If not, feel free to give us some more feedback.
Christian
[1] http://www.w3.org/TR/xpath-functions/#func-collection [2] http://docs.basex.org/wiki/Databases ___________________________
Hi Guys,
I was trying to use the fn:collectino function today, but I am having trouble understanding the implementation. From past experience, fn:collection($uri) (where $uri points to a document with a list of docs within it) has returned a sequence of all the documents. It appears that BaseX does not implement it this way.
I have a database where I am storing a large number of documents, and I would like to have several collections inside which are subsets of these documents. I need to open these subsets quickly, and I thought
fn:collection
would allow me to do this. Is there any way to easily open these subsets using fn:collection (or a similar high performance function)? As of right now I am solving the problem by using a for loop to traverse the
documents,
but this is not fast enough for my needs.
Thanks,
Jeremy
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk