James, Thanks for the information.
Just some food for thought. Although it is necessary to keep nodes associated with their original document, but it seems little bit of troubling when you think of browsing a database. Also, when we put multiple xml files into a collection, each dom tree actually merged into a global tree or forest. The root of a collection should be the conceptual '/'. All xpath should be relative to the collection root, rather than each document's root. They look the same, but fundamentally they are not. Just like the question that I asked, if the root is the collection, I will be able to find all top level node (let's say get all children of '/') across documents. Otherwise, I need to get every document and find the root node of that document. Actually, instead of sending a Xpath query (e.g. /A/B) to a collection (e.g. /db/contact), we might send a query (/db/contact/A/B) to the database. I guess that's too much to ask now. If each root node belongs to each document, the query '/A/B' is actually '/*/A/B' where the '*' represent the document level sub-collections. To me, current implementation serves well on query model. It would be great if it also can serve a navigation model. Is there any plan to establish a global (collection-wise) tree or forest which maintains the hierarchy of all nodes in a certain collection? I will be interested in participate that effort. Again, I am new here. Xindice is a great project and I respect that wholeheartedly. Just some thoughts, and I hope I didn't offense anyone. Lixin -----Original Message----- From: James Bates [mailto:[EMAIL PROTECTED] Sent: Thursday, November 21, 2002 8:16 AM To: [EMAIL PROTECTED] Subject: Re: Xindice structure On Thursday 21 November 2002 16:07, Lixin Meng wrote: > I am new to Xindice too. > > One question that I have is that where to find meta information about > collections. For example, if I want to find the name for all top level > nodes, instead of issuing query like "/" then iterating the whole > collection, is there a less expensive way to do so. Is there any > information in 'system' collection will accelerate the process? > > Lixin > There are two things: each document in a collection has a NAME (key), and XML content, which itself obviously contains a root element, with a possibly completey different name. To find the document NAMES in a collection, using listdocuments from the cmd-line tool, or the equivalent API call is probably the fastest. On the other, to find elemnt names contained inside documents, you could use the "symbol tables" (only available for compressed collections, but these are the default types of collections in Xindice). To do so, look for a document called /db/system/SysSymbols/<collection_path> Where you must substitute the complete path of your collection, excluding the initial "/db/", and replacing all '/'s with '_'s For example, the collection /db/hello/world 's Symbol table would be in /db/system/SysSymbols/hello_world. This symbol table contains ALL element and attribute names present in any document in the collection. It's the only information I can think of... James > -----Original Message----- > From: James Bates [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 21, 2002 1:59 AM > To: [EMAIL PROTECTED] > Subject: Re: Xindice structure > > > As far as I understand (and that's mainly through reverse engeneering): > > The .tbl files are B-Tree files, that store the hierarchy of the XML > document > indexed using element and attribute names. In principle this allows for > faster searching for the information you're after. > > You can store any well-formed XML into Xindice, and the import procedures > will > automatically "cut up" your XML into the various parts needed to fill the > B-Tree. > > There is one B-Tree file for every collection you define, so in theory > cross-platforms searches would be slow... > > If anyone wishes to correct me, please go ahead. I wouldn't mind having > some direct info from the people that developed this myself :) (Kimbro?, > Tom?) > > James > > On Wednesday 20 November 2002 17:41, Alex Mariano Costa de Oliveira wrote: > > Hello, > > > > When I first read about XML native databases, I thought all of them > > could store XML documents. Working with Xindice, I realized that there > > is a .tbl file in any database directory. So, my questions are : > > - What does Xindice do with the XML documents added to a > > database? - What is that tbl file structure? > > - Is there any performance concern behind this structure? > > > > Regards, > > Alex Mariano