Hi Natania,

Thanks, I will change the PATH from /db/addressbook to /db/cad.

Change the subject again.  I am new with xml database.  How it can be used
in a typical web application?  What is a typical way to handle multiple
users and version control?

I am working on an online CAD tool that would serve multiple users with
programmable group read/write access allowance (similar to file access in
Unix system) and version control. On the surface, the xml database can be
setup as following:

/db/
   cad/
        group0/
                user0/
                       proj0/
                              page0/
                              page1/
                              page2/
                              ...
                       proj1/
                       ...
                 user1/
                       proj0/
                              page0/
                              page1/
                              page2/
                              ...
                       proj1/
                       ...
                 user2
                 ...
        group1/
        ...

How should I handle programmable access?  should I use attribute in the
project level to handle it?  What is minimum unit for an update?  Should we
handle update in the page level or could it be done in even lower
level?  How should I implement version control in that case?

Thanks,

Tak



On Fri, Sep 19, 2008 at 9:18 PM, Natalia Shilenkova
<[EMAIL PROTECTED]>wrote:

> On Fri, Sep 19, 2008 at 3:08 PM, Tak-po Li <[EMAIL PROTECTED]> wrote:
> >
> > Thanks, Natalia, I have a few questions on Addcontact.java:
> >
> >          // Create the XMLResource and store the document
> >          XMLResource resource = (XMLResource) col.createResource( "",
> > "XMLResource" );
> >          resource.setContent(ourdoc);
> >          col.storeResource(resource);
> > I believe ourdoc is the xml string.  However, I believe this is for
> > addressbook data base only.  How should I change it to a database name
> > "cad"?
>
> You are correct, ourdoc variable contains an xml string. To store a
> document in a different collection, you just need to get a different
> collection instance from a database, the code above does not need to
> change. The collection instance used by addressbook is initialized in
> DBConnection.java.  In that class, application accesses a collection
> xmldb:xindice://localhost:8080/db/addressbook, so it needs to be
> changed to xmldb:xindice://localhost:8080/db/cad. Don't forget to
> create this collection before trying to access it from the
> application.
>
> Regards,
> Natalia
>
> > Thanks,
> >
> > Tak
>

Reply via email to