Hey,
Thanks for the quick reply!
I decided to do a simple query using basex:db(), and its results are... odd. Simply performing:
only returns the first document in my database. I thought maybe the database was corrupt or something, so I tried:for $doc in basex:db('yourdb')return $doc
And that returned the entire structure of all documents in the database.for $doc in /my_root_node
return $doc
Hi there,the most convenient way to identify documents inside collections might be restricting the the query to a single document or a group of documents via matching the document-uri()Please note that the document-uri() function only evaluates document-nodes, to test against inner nodes you should usefor $doc in basex:db('yourdb')where matches(document-uri($doc),'test.xml')return $docbase-uri($node) instead of document-uri():for $node in basex:db('yourdb')//childwhere matches(base-uri($node),'test.xml')return $nodeAs there is no standardized way of handling collections of XML documents we are still looking forward to feedback regarding this issue.Hope this helps, feel free to ask more otherwise.Kind regardsMichaelAm 29.07.2010 um 16:29 schrieb cosmotron+basex@gmail.com:If I add two documents to a BaseX DB, let's say normal.xml and normal2.xml, is there a way to refer to each one individually?
I know about the doc() function, but it looks at the filesystem for their location, rather than in the database itself.
For instance, if I query with this: doc("normal.xml")/name , then I will get an error about normal.xml not being found.
I also tried: basex:db("my-db-name")/doc("normal.xml")/name and received the same error.
Thanks for any help!
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk