cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: [RT] forms
Date Fri, 20 Jul 2001 14:10:32 GMT
On 19.Jul.2001 -- 05:00 PM, Peter Nuetzel - inglobo wrote:
> I've implemented something similar:
> My form descriptor is similar to the XForms WD. I've made some
> simplifications and some enhancements to allow simple processing and
> validation definitions.
> example form control:
>     <textbox ref="person/user-id">
>         <caption>User ID</caption>
>         <validate type="null">User ID must be specified.</validate>
>         <validate type="string" minlen="5" maxlen="20">The User ID must
> have 5 to 20 characters</validate>
>         <validate type="unique">The User ID is already used. Please enter
> an other.</validate>
>     </textbox>

Looks good.

> The response from the client (ServletRequest) is evaluated by an Action. On
> the first request of the form an XMLFragment (Node, DocumentFragment) is
> created from the default instance data in the form descriptor or the
> referenced XML data (using XLink). The request values from the HTML form
> are validated and written to the DOM Node. The DOM Node is saved as request
> attribute or in the session if needed over more requests (multipage forms).
> If the submitted form data is not valid according to the information in the
> form descriptor the Action redirects the user request to the form
> presentation again. There I use an extented TraxTransformer to pass the
> updated DOM Node (instance data) and the validation result to the XSLT
> sheet as parameters (as XPath node-set).


> My multipage solution is very simple. I define a total number of pages in
> my form descriptor and the same amount of form elements with corresponding
> page attributes:
> <form-descriptor pages="3">
>     <instance/>
>     <form page="1"/>
>     <form page="2"/>
>     <form page="3"/>
> </form-descriptor>
> The disadvantage of this solution is that only multi page forms with a
> sequential process can be declared. But I dont need other ;-)

Perhaps it can be extended. I wouldn't miss it ;-)

> I would like to donate my stuff. But I must admit its a very raw hack and
> needs lots of refactoring. And I've only implemented the things I really
> needed for my project (of course ;).

Even greater! It's million times better than to start from scratch!


C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

To unsubscribe, e-mail:
For additional commands, email:

View raw message