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 > _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk