You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Alex Mariano Costa de Oliveira <ma...@inf.ufsc.br> on 2002/11/20 17:41:11 UTC

Xindice structure

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


RE: Xindice structure

Posted by Lixin Meng <lx...@yahoo.com>.
I haven't setup my CVS client yet (btw, any recommendation on CVS windows
client for Win2K? I downloaded a wincvs). So I downloaded the .tar.gz
version from <http://cvs.apache.org/~vladimir/>. The build.bat created the
jar file. However, when I tried to start the server, I couldn't find the
startup.bat in the XINDICE_HOME directory. Tried to recycle the startup.bat
from release 1.0, but got exception as following.

Does this mean, from now on, there is no longer a standalone version, or
just I downloaded the wrong files, or I missed something?

Lixin

--------------------------
W:\study\cvs.xml-xindice>set classpath
CLASSPATH=W:\study\cvs.xml-xindice\dist\xindice-1.1b.jar

W:\study\cvs.xml-xindice>.\startup
java -classpath
"W:\study\cvs.xml-xindice\dist\xindice-1.1b.jar;C:\APPS\jakarta-ant-1.3\conf
ig;W:\st
udy\cvs.xml-xindice\java\lib\ant-1.5.1.jar;W:\study\cvs.xml-xindice\java\lib
\commons-logging-1.0.1.j
ar;W:\study\cvs.xml-xindice\java\lib\infozone-tools.jar;W:\study\cvs.xml-xin
dice\java\lib\junit-3.8.
1.jar;W:\study\cvs.xml-xindice\java\lib\junit-addons-1.1.jar;W:\study\cvs.xm
l-xindice\java\lib\junit
perf-1.8.jar;W:\study\cvs.xml-xindice\java\lib\servlet.jar;W:\study\cvs.xml-
xindice\java\lib\xalan-2
.4.0.jar;W:\study\cvs.xml-xindice\java\lib\xercesImpl-2.1.0.jar;W:\study\cvs
.xml-xindice\java\lib\xm
l-apis-1.0b3.jar;W:\study\cvs.xml-xindice\java\lib\xmldb-api-20021118.jar;W:
\study\cvs.xml-xindice\j
ava\lib\xmldb-api-sdk-20021118.jar;W:\study\cvs.xml-xindice\java\lib\xmldb-x
update.jar;W:\study\cvs.
xml-xindice\java\lib\xmlrpc-1.1.jar" -noverify
org.apache.xindice.server.Xindice W:\study\cvs.xml-xi
ndice\config\system.xml
Exception in thread "main" java.lang.NoSuchMethodError: main
W:\study\cvs.xml-xindice>
--------------------------


-----Original Message-----
From: James Bates [mailto:james@amplexor.com]
Sent: Friday, November 22, 2002 2:22 AM
To: xindice-dev@xml.apache.org
Subject: Re: Xindice structure


I notice you're using the old "release" version of Xindice. I'd strongly
recommend upgrading to the current CVS version, before attempting anything
further...

James


On Thursday 21 November 2002 21:09, Lixin Meng wrote:
> I used to be able to run Xindice on my machine (two days ago). All the
> sudden, all commands will return 'ERROR:' as below. I couldn't find
> anything from the log. Anyone has a clue where should I look into.
>
> I search this mail archive and found one reported a similar problem after
> the machine was in standby mode. No answer except one asked if the machine
> was using DHCP. Mine was not in standby mode. I do use DHCP though. After
> the problem, I did try to reboot and even re-install the Xindice.
>
> Any help will be appreciated.
>
> Lixin
>
>
> ------------------ client side ---------------------------
> C:\>set CLASSPATH=W:\study\xml-xindice-1.0\java\lib\Xindice.jar
>
> C:\>xindiceadmin add_collection -c /db -n xyz
> ERROR :
> C:\>
> ------------------ end of client side ---------------------------
>
> ------------------ server side ---------------------------
> W:\study\xml-xindice-1.0>startup
> java -classpath
>
"W:\study\xml-xindice-1.0\java\lib\Xindice.jar;C:\APPS\jakarta-ant-1.3\conf
>i g;W:\stu
>
dy\xml-xindice-1.0\java\lib\ant-1.4.1.jar;W:\study\xml-xindice-1.0\java\lib
>\ examples.jar;W:\study\xm
>
l-xindice-1.0\java\lib\infozone-tools.jar;W:\study\xml-xindice-1.0\java\lib
>\ openorb-1.2.0.jar;W:\stu
>
dy\xml-xindice-1.0\java\lib\openorb_tools-1.2.0.jar;W:\study\xml-xindice-1.
>0 \java\lib\xalan-2.0.1.ja
>
r;W:\study\xml-xindice-1.0\java\lib\xerces-1.4.3.jar;W:\study\xml-xindice-1
>. 0\java\lib\xindice.jar;W
>
>
:\study\xml-xindice-1.0\java\lib\xml-apis-1.0.jar;W:\study\xml-xindice-1.0\
> :j
>
> ava\lib\xmldb-sdk.jar;W:
>
\study\xml-xindice-1.0\java\lib\xmldb-xupdate.jar;W:\study\xml-xindice-1.0\
>j ava\lib\xmldb.jar;C:\APP
> S\j2sdk1.4.1_01\lib\tools.jar" -noverify
> org.apache.xindice.core.server.Xindice W:\study\xml-xindice
> -1.0\config\system.xml
>
> Xindice 1.0 (Birthday)
>
> Database: 'db' initializing
> Script: 'GET' added to script storage
> Service: 'db' started
> Service: 'HTTPServer' started @ http://sanjose:4080/
> Service: 'APIService' started
>
> Server Running
> ------------------ end of server side ---------------------------


Connecting Xindice 1.1b

Posted by Lixin Meng <lx...@yahoo.com>.
I downloaded the latest CVS version of Xindice 1.1b, built it, and deployed
it with Tomcat 4.1.12. The tomcat console has following information, and I
assume it is fine. However, when I run "xindice ac -c /db -n xyz", I got
error message "ERROR : Collection not found!".

Did I miss anything here?

Lixin

------------
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.12
Nov 23, 2002 3:10:23 PM org.apache.xindice.core.Database setConfig
INFO: Database points to C:\apps\Tomcat 4.1\.\db
Nov 23, 2002 3:10:24 PM org.apache.xindice.server.XindiceServlet init
INFO: Database successfully started
------------






RE: database root directory of Xindice 1.1b

Posted by Lixin Meng <lx...@yahoo.com>.
I agree. Frankly, I didn't know where and how to put that single trouble
shooting item. That's why I wrote previous email to make it at least
accessible from archive.

Lixin

-----Original Message-----
From: Vladimir R. Bossicard [mailto:vladimir@apache.org]
Sent: Monday, November 25, 2002 8:36 AM
To: xindice-dev@xml.apache.org
Subject: Re: database root directory of Xindice 1.1b


> I wish I would have time to learn those rules and tools for writing
> documents.

<sample>

Hi,

I don't have the time to learn how to edit the documentation but find
below the description and solution of the problem I had:

   ... your input here ...

I thought that a documentation, even in a plain text format, would be
better than no documentation at all.

</sample>

-Vladimir

--
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice


Re: database root directory of Xindice 1.1b

Posted by "Vladimir R. Bossicard" <vl...@apache.org>.
> I wish I would have time to learn those rules and tools for writing
> documents.

<sample>

Hi,

I don't have the time to learn how to edit the documentation but find 
below the description and solution of the problem I had:

   ... your input here ...

I thought that a documentation, even in a plain text format, would be 
better than no documentation at all.

</sample>

-Vladimir

-- 
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice



RE: database root directory of Xindice 1.1b

Posted by Lixin Meng <lx...@yahoo.com>.
I wish I would have time to learn those rules and tools for writing
documents.

Lixin

-----Original Message-----
From: Vladimir R. Bossicard [mailto:vladimir@bossicard.com]
Sent: Monday, November 25, 2002 12:31 AM
To: xindice-dev@xml.apache.org
Subject: Re: database root directory of Xindice 1.1b


 > Again, thanks for helping me out, and I hope above explanation can
provide
 > some hints to whoever can write a better FAQ.

Why not writing one yourself?

-Vladimir

--
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice



Re: database root directory of Xindice 1.1b

Posted by "Vladimir R. Bossicard" <vl...@bossicard.com>.
 > Again, thanks for helping me out, and I hope above explanation can 
provide
 > some hints to whoever can write a better FAQ.

Why not writing one yourself?

-Vladimir

-- 
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice




Re: database root directory of Xindice 1.1b

Posted by Michael Westbay <we...@users.sourceforge.net>.
Klemens-sensei wrote:

> We also found that the db seems to be created in c:/Windows/system32 if
> we did not modify the system.xml file specified and start tomcat as a
> service.

Right.  The "./db/" configuration means that it will be created in the 
directory called "db" under the "current directory."  The "current directory" 
is whereever you start Tomcat from.

This may become a serious problem for developers who are starting and stopping 
Tomcat from different working directories while they are tuning an 
application.

For the XML-RPC version, I would rather have the directory be relative to the 
current servlet context.  With a default value of "/WEB-INF/db" (with logic 
to make the leading '/' optional) I would know exactly where the database 
should be.  Furthermore, this will work on all platforms the same.

The major drawback to this solution that I see is that one MUST expand the 
.war file for use in order to have a writable directory available.  (I 
haven't tested it, but I can't think of a reason why this won't run left in 
its WAR state.)

I know that the XML-RPC servlet is just one example of how a server could be 
built.  I just fear that having the default database storage location in a 
completely unrelated directory (such at Windows' Start menu heirarchy) will 
tend to confuse a lot of people getting started.  Having it under WEB-INF is 
much more logical.

-- 
Michael Westbay
Work: Beacon-IT http://www.beacon-it.co.jp/
Home:           http://www.seaple.icc.ne.jp/~westbay
Commentary:     http://www.japanesebaseball.com/forum/


AW: database root directory of Xindice 1.1b

Posted by "Dr. Klemens Waldhör" <Wa...@t-online.de>.
Hi,

Glad that I could helkp you.

We also found that the db seems to be created in c:/Windows/system32 if
we did not modify the system.xml file specified and start tomcat as a
service.

Klemens

-----Ursprüngliche Nachricht-----
Von: Lixin Meng [mailto:lxmeng@yahoo.com] 
Gesendet: Montag, 25. November 2002 08:13
An: xindice-dev@xml.apache.org
Betreff: RE: database root directory of Xindice 1.1b


Klemens,

Thanks for the tip. However, in my installation (I used the tomcat
default windows installation shield), I found the 'system.xml' is
actually in directory (tomcat unzipped the Xindice.war file there)
	c:/.../tomcatdir/webapps/Xindice/WEB-INF

Anyway, after alerting the line
   <root-collection dbroot="./db/" name="db">
to
   <root-collection dbroot="C:/APPS/Tomcat 4.1/db/" name="db"> , the
location of database can be specified properly.

To rationalize what happened before, I guess the reason is that I was
using the "start tomcat" shortcut (created by the installation program),
which is located in
	C:\Documents and Settings\Lixin Meng\Start Menu\Programs\Apache
Tomcat JRE or tomcat thought that's the working directory. Since the
configuration say './db/', it caused the confusion.

Again, thanks for helping me out, and I hope above explanation can
provide some hints to whoever can write a better FAQ.

Lixin


-----Original Message-----
From: Dr. Klemens Waldhör [mailto:Waldhoer@t-online.de]
Sent: Sunday, November 24, 2002 10:07 PM
To: xindice-dev@xml.apache.org
Subject: AW: database root directory of Xindice 1.1b


In my case the db is used from dbroot="c:/programme/xindice1.1/db/"

I configured this in
c:/.../tomcatdir/work/standalone/localhost/xindice/system.xml.

Klemens

-----Ursprüngliche Nachricht-----
Von: Lixin Meng [mailto:lxmeng@yahoo.com]
Gesendet: Sonntag, 24. November 2002 00:53
An: xindice-dev@xml.apache.org
Betreff: database root directory of Xindice 1.1b


When I run Xindice 1.1b with Tomcat 4.1.12, in Tomcate console, it
shows:

---------------
Nov 23, 2002 3:10:23 PM org.apache.xindice.core.Database setConfig
INFO: Database points to C:\apps\Tomcat 4.1\.\db
Nov 23, 2002 3:10:24 PM org.apache.xindice.server.XindiceServlet init
---------------

However, I found the '\db' is actually created under directory:

------------
C:\Documents and Settings\Lixin Meng\Start Menu\Programs\Apache Tomcat
4.1\
------------

This is the directory where all those Windows menus goes (i.e. [Starts]
-> [Programs] -> [Apache Tomcat 4.1].

Any idea how can change it to somewhere else?

Lixin


RE: database root directory of Xindice 1.1b

Posted by Lixin Meng <lx...@yahoo.com>.
Klemens,

Thanks for the tip. However, in my installation (I used the tomcat default
windows installation shield), I found the 'system.xml' is actually in
directory (tomcat unzipped the Xindice.war file there)
	c:/.../tomcatdir/webapps/Xindice/WEB-INF

Anyway, after alerting the line
   <root-collection dbroot="./db/" name="db">
to
   <root-collection dbroot="C:/APPS/Tomcat 4.1/db/" name="db">
, the location of database can be specified properly.

To rationalize what happened before, I guess the reason is that I was using
the "start tomcat" shortcut (created by the installation program), which is
located in
	C:\Documents and Settings\Lixin Meng\Start Menu\Programs\Apache Tomcat
JRE or tomcat thought that's the working directory. Since the configuration
say './db/', it caused the confusion.

Again, thanks for helping me out, and I hope above explanation can provide
some hints to whoever can write a better FAQ.

Lixin


-----Original Message-----
From: Dr. Klemens Waldhör [mailto:Waldhoer@t-online.de]
Sent: Sunday, November 24, 2002 10:07 PM
To: xindice-dev@xml.apache.org
Subject: AW: database root directory of Xindice 1.1b


In my case the db is used from dbroot="c:/programme/xindice1.1/db/"

I configured this in
c:/.../tomcatdir/work/standalone/localhost/xindice/system.xml.

Klemens

-----Ursprüngliche Nachricht-----
Von: Lixin Meng [mailto:lxmeng@yahoo.com]
Gesendet: Sonntag, 24. November 2002 00:53
An: xindice-dev@xml.apache.org
Betreff: database root directory of Xindice 1.1b


When I run Xindice 1.1b with Tomcat 4.1.12, in Tomcate console, it
shows:

---------------
Nov 23, 2002 3:10:23 PM org.apache.xindice.core.Database setConfig
INFO: Database points to C:\apps\Tomcat 4.1\.\db
Nov 23, 2002 3:10:24 PM org.apache.xindice.server.XindiceServlet init
---------------

However, I found the '\db' is actually created under directory:

------------
C:\Documents and Settings\Lixin Meng\Start Menu\Programs\Apache Tomcat
4.1\
------------

This is the directory where all those Windows menus goes (i.e. [Starts]
-> [Programs] -> [Apache Tomcat 4.1].

Any idea how can change it to somewhere else?

Lixin


AW: database root directory of Xindice 1.1b

Posted by "Dr. Klemens Waldhör" <Wa...@t-online.de>.
In my case the db is used from dbroot="c:/programme/xindice1.1/db/"

I configured this in
c:/.../tomcatdir/work/standalone/localhost/xindice/system.xml.

Klemens

-----Ursprüngliche Nachricht-----
Von: Lixin Meng [mailto:lxmeng@yahoo.com] 
Gesendet: Sonntag, 24. November 2002 00:53
An: xindice-dev@xml.apache.org
Betreff: database root directory of Xindice 1.1b


When I run Xindice 1.1b with Tomcat 4.1.12, in Tomcate console, it
shows:

---------------
Nov 23, 2002 3:10:23 PM org.apache.xindice.core.Database setConfig
INFO: Database points to C:\apps\Tomcat 4.1\.\db
Nov 23, 2002 3:10:24 PM org.apache.xindice.server.XindiceServlet init
---------------

However, I found the '\db' is actually created under directory:

------------
C:\Documents and Settings\Lixin Meng\Start Menu\Programs\Apache Tomcat
4.1\
------------

This is the directory where all those Windows menus goes (i.e. [Starts]
-> [Programs] -> [Apache Tomcat 4.1].

Any idea how can change it to somewhere else?

Lixin


database root directory of Xindice 1.1b

Posted by Lixin Meng <lx...@yahoo.com>.
When I run Xindice 1.1b with Tomcat 4.1.12, in Tomcate console, it shows:

---------------
Nov 23, 2002 3:10:23 PM org.apache.xindice.core.Database setConfig
INFO: Database points to C:\apps\Tomcat 4.1\.\db
Nov 23, 2002 3:10:24 PM org.apache.xindice.server.XindiceServlet init
---------------

However, I found the '\db' is actually created under directory:

------------
C:\Documents and Settings\Lixin Meng\Start Menu\Programs\Apache Tomcat 4.1\
------------

This is the directory where all those Windows menus goes (i.e. [Starts] ->
[Programs] -> [Apache Tomcat 4.1].

Any idea how can change it to somewhere else?

Lixin


Re: Xindice structure

Posted by James Bates <ja...@amplexor.com>.
I notice you're using the old "release" version of Xindice. I'd strongly 
recommend upgrading to the current CVS version, before attempting anything 
further...

James


On Thursday 21 November 2002 21:09, Lixin Meng wrote:
> I used to be able to run Xindice on my machine (two days ago). All the
> sudden, all commands will return 'ERROR:' as below. I couldn't find
> anything from the log. Anyone has a clue where should I look into.
>
> I search this mail archive and found one reported a similar problem after
> the machine was in standby mode. No answer except one asked if the machine
> was using DHCP. Mine was not in standby mode. I do use DHCP though. After
> the problem, I did try to reboot and even re-install the Xindice.
>
> Any help will be appreciated.
>
> Lixin
>
>
> ------------------ client side ---------------------------
> C:\>set CLASSPATH=W:\study\xml-xindice-1.0\java\lib\Xindice.jar
>
> C:\>xindiceadmin add_collection -c /db -n xyz
> ERROR :
> C:\>
> ------------------ end of client side ---------------------------
>
> ------------------ server side ---------------------------
> W:\study\xml-xindice-1.0>startup
> java -classpath
> "W:\study\xml-xindice-1.0\java\lib\Xindice.jar;C:\APPS\jakarta-ant-1.3\conf
>i g;W:\stu
> dy\xml-xindice-1.0\java\lib\ant-1.4.1.jar;W:\study\xml-xindice-1.0\java\lib
>\ examples.jar;W:\study\xm
> l-xindice-1.0\java\lib\infozone-tools.jar;W:\study\xml-xindice-1.0\java\lib
>\ openorb-1.2.0.jar;W:\stu
> dy\xml-xindice-1.0\java\lib\openorb_tools-1.2.0.jar;W:\study\xml-xindice-1.
>0 \java\lib\xalan-2.0.1.ja
> r;W:\study\xml-xindice-1.0\java\lib\xerces-1.4.3.jar;W:\study\xml-xindice-1
>. 0\java\lib\xindice.jar;W
>
> :\study\xml-xindice-1.0\java\lib\xml-apis-1.0.jar;W:\study\xml-xindice-1.0\
> :j
>
> ava\lib\xmldb-sdk.jar;W:
> \study\xml-xindice-1.0\java\lib\xmldb-xupdate.jar;W:\study\xml-xindice-1.0\
>j ava\lib\xmldb.jar;C:\APP
> S\j2sdk1.4.1_01\lib\tools.jar" -noverify
> org.apache.xindice.core.server.Xindice W:\study\xml-xindice
> -1.0\config\system.xml
>
> Xindice 1.0 (Birthday)
>
> Database: 'db' initializing
> Script: 'GET' added to script storage
> Service: 'db' started
> Service: 'HTTPServer' started @ http://sanjose:4080/
> Service: 'APIService' started
>
> Server Running
> ------------------ end of server side ---------------------------


RE: Xindice structure

Posted by Lixin Meng <lx...@yahoo.com>.
I used to be able to run Xindice on my machine (two days ago). All the
sudden, all commands will return 'ERROR:' as below. I couldn't find anything
from the log. Anyone has a clue where should I look into.

I search this mail archive and found one reported a similar problem after
the machine was in standby mode. No answer except one asked if the machine
was using DHCP. Mine was not in standby mode. I do use DHCP though. After
the problem, I did try to reboot and even re-install the Xindice.

Any help will be appreciated.

Lixin


------------------ client side ---------------------------
C:\>set CLASSPATH=W:\study\xml-xindice-1.0\java\lib\Xindice.jar

C:\>xindiceadmin add_collection -c /db -n xyz
ERROR :
C:\>
------------------ end of client side ---------------------------

------------------ server side ---------------------------
W:\study\xml-xindice-1.0>startup
java -classpath
"W:\study\xml-xindice-1.0\java\lib\Xindice.jar;C:\APPS\jakarta-ant-1.3\confi
g;W:\stu
dy\xml-xindice-1.0\java\lib\ant-1.4.1.jar;W:\study\xml-xindice-1.0\java\lib\
examples.jar;W:\study\xm
l-xindice-1.0\java\lib\infozone-tools.jar;W:\study\xml-xindice-1.0\java\lib\
openorb-1.2.0.jar;W:\stu
dy\xml-xindice-1.0\java\lib\openorb_tools-1.2.0.jar;W:\study\xml-xindice-1.0
\java\lib\xalan-2.0.1.ja
r;W:\study\xml-xindice-1.0\java\lib\xerces-1.4.3.jar;W:\study\xml-xindice-1.
0\java\lib\xindice.jar;W
:\study\xml-xindice-1.0\java\lib\xml-apis-1.0.jar;W:\study\xml-xindice-1.0\j
ava\lib\xmldb-sdk.jar;W:
\study\xml-xindice-1.0\java\lib\xmldb-xupdate.jar;W:\study\xml-xindice-1.0\j
ava\lib\xmldb.jar;C:\APP
S\j2sdk1.4.1_01\lib\tools.jar" -noverify
org.apache.xindice.core.server.Xindice W:\study\xml-xindice
-1.0\config\system.xml

Xindice 1.0 (Birthday)

Database: 'db' initializing
Script: 'GET' added to script storage
Service: 'db' started
Service: 'HTTPServer' started @ http://sanjose:4080/
Service: 'APIService' started

Server Running
------------------ end of server side ---------------------------


RE: Xindice structure

Posted by Lixin Meng <lx...@yahoo.com>.
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:james@amplexor.com]
Sent: Thursday, November 21, 2002 8:16 AM
To: xindice-dev@xml.apache.org
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:james@amplexor.com]
> Sent: Thursday, November 21, 2002 1:59 AM
> To: xindice-dev@xml.apache.org
> 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


Re: Xindice structure

Posted by James Bates <ja...@amplexor.com>.
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:james@amplexor.com]
> Sent: Thursday, November 21, 2002 1:59 AM
> To: xindice-dev@xml.apache.org
> 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


RE: Xindice structure

Posted by Lixin Meng <lx...@yahoo.com>.
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

-----Original Message-----
From: James Bates [mailto:james@amplexor.com]
Sent: Thursday, November 21, 2002 1:59 AM
To: xindice-dev@xml.apache.org
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


Re: Xindice structure

Posted by James Bates <ja...@amplexor.com>.
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