Excelent document.

I would like to suggest a slight improvement.
The Model part can be improved quite a bit if you use a DOM object directly
instead of a JavaBean wrapper.

more specificly:

1) You can remove ArtistBean altogether
2) Store the empty id structure in a static file or local constant
3) Override the getForm() method in the action
4) Use the JXPath DOMContainer to load the xml file(constant)
5) Use the DOMContainer object as the Form model
6) When you need to reference a node in the model, instead of using the DOM
API, you can directly use XPath,
like this: getForm().getValue("/@id")


If you follow these steps and I am not totally wrong, you should be able to
cut about 50 lines from the sample.


-=Ivelin=-

----- Original Message -----
From: "Josema Alonso" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 2:42 AM
Subject: RE: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]


> Ouch...I forgot to include the URL. I'm sorry.
>
> http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormXindice
>
> Thanks :)
>
> -----Mensaje original-----
> De: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
> Enviado el: jueves, 23 de enero de 2003 4:24
> Para: [EMAIL PROTECTED]
> Asunto: Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]
>
>
>
> What is the URL?
>
> -=Ivelin=-
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to