Modifying the intro-tutorial example for editing only an element of a big books.xml file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Modifying the intro-tutorial example for editing only an element of a big books.xml file

Edgard Pineda-2
Hi eveyone,
I was reading http://www.orbeon.com/ops/doc/intro-tutorial and I got a
doubt: if you have a very big books.xml file in eXist DB, and you want
to modify the view.xhtml to put a XForms form with only a field to
edit a specific element within one specific book, how I can do this
without loading and saving all books.xml?

Thanks.

Cheers,
Edgard.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Modifying the intro-tutorial example for editing only an element of a big books.xml file

marc-62
Edgard Pineda a écrit :

> Hi eveyone,
> I was reading http://www.orbeon.com/ops/doc/intro-tutorial and I got a
> doubt: if you have a very big books.xml file in eXist DB, and you want
> to modify the view.xhtml to put a XForms form with only a field to
> edit a specific element within one specific book, how I can do this
> without loading and saving all books.xml?
>

Edgard,

You may use the update extension with eXist REST API.

http://exist.sourceforge.net/update_ext.html

HTH,

Marc




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Modifying the intro-tutorial example for editing only an element of a big books.xml file

Erik Bruchez
Administrator
In reply to this post by Edgard Pineda-2
Edgard,

For simplicity, the Bookcast application deals with a single "file"
(although in eXist, it's not really a file, it's just a persistent XML
DOM, and it appears not to make much of a different to use one large
document or many small ones from eXist's perspective).

It is clearly possible to implement different strategies, such as:

1. Still using a single large XML document in eXist, but reading and
updating only parts of it at a time (at the granularity of a <book>
element).

2. Storing multiple XML documents (one per <book>) into eXist.

#2 is what the Government Forms application does: it stores each form as
a separate document in the database.

To convert the Bookcast application to this strategy is not too hard to
do, but difficult to detail in just a few lines. I would try to follow
the Govt Forms application's lead, and maybe have two pages: one that
shows a summary of the books available in the database, and the other
allowing adding/editing a single book.

-Erik

Edgard Pineda wrote:

> Hi eveyone,
> I was reading http://www.orbeon.com/ops/doc/intro-tutorial and I got a
> doubt: if you have a very big books.xml file in eXist DB, and you want
> to modify the view.xhtml to put a XForms form with only a field to
> edit a specific element within one specific book, how I can do this
> without loading and saving all books.xml?
>
> Thanks.
>
> Cheers,
> Edgard.
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws