Hi Edward,
May be my question about the diff bewteen database and collection make many people confused. I post this question because I was confused by the structure of baseX's database.
questions like this are welcome; they often help us to improve our documentation. Do you think that the current Wiki information gives you all the relevant information you need?
And another question: base-uri() return the string value based on Input Path of database. and the base-uri was different if I loaded same data from different folder. why the base-uri() does not return it's path in the database?
XQuery itself has no database semantics, and the implementation of the doc() and collection() are mostly implementation defined, which is why the base-uri() returns confusing information if documents in databases are addressed. To explicitly open documents in a database, I recommend to use db:open(), or db:list() to retrieve all resources within a database [1].
Hope this helps, Christian