cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Forms proposal
Date Mon, 03 Jul 2000 21:42:33 GMT
Nicola Ken Barozzi wrote:
> 
> ----- Original Message -----
> From: "Jon Lancelle" <jkl@knosys.com>
> To: <cocoon-dev@xml.apache.org>
> Sent: Sunday, July 02, 2000 8:00 PM
> Subject: Your favorite way to handle form submissions
> 
> > Any thoughts on handling form submissions from the client via Cocoon? I
> > want to start down the right path from square one...
> >
> >
> > My first inclination is to write a producer. Has anyone used ECS from
> > Apache successfully in a producer?
> >
> > How about a simple servlet which either redirects when done to an *.xml
> > file for continuation or generates some well-formed HTML in response,
> > complete with links back to the xml model?
> >
> > Jon Lancelle
> 
> I would like to take this mail as an opportunity to discuss about the use of
> forms in Cocoon, and about how it can be done.

Ouch, big issue.... should we postpone this after the sitemap discussion
is finished?
 
> I know that others have started similar discussions and implementations
> in the past, and I apologise beforehand if I repeat things and are not
> aware of some past conclusions.
> This is my contribution to the subject, I'm waiting comments.

Ok, but I can't guarantee you too much bandwidth on this right now.
 
> The goal is setting up a new form system that integrates well with
> the notion of content-view separation.

Ok

> The system has to be as flexible, simple and extensible as possible.

Good.

> The starting point is the XForms specification draft on the W3C site.

Good.
 
> First of all: what is a form?
> Even better: what is a form system?

This is my kind of guy :)
 
> A form system is a way of inverting the data stream: the data comes
> from the client.
> A form is a way of presenting the "questions" that answered create the
> data sent to the server.
> 
> The verb "presenting" suggests that forms are
> a view... so they need stylesheets (1), one for every client type.
> Forms are not only style, because they are also content like any other
> content. You need xml (2) to drive a stylesheet.
> Form data needs to be checked for correctness, so you
> need a validator (3).
> The validator validates against a schema (4).
> Then you need to do something with the data (5).
> 
> Looking at the XForm spec you can see that (2) is html, svg, etc.
> We need xml that gets mapped dynamically to those formats.

Yep.
 
> The following is a scheme of how things can work and what is needed.
> I made two versions hoping all can see it ok.
> (this drawing is for fixed space fonts).
> 
> 4)                 -----------------------
> XML Schema --------|   schema file ref    |
>                    |                      |
>                    | <xml>                |
>                    |                      |
>                    |                      |
>                    |<schema element ref/> | (2)
>                    |                      |
>                    |                      |
>                    |      </xml>          |
>                    |                      |
>                    -----------------------
>                             |
>  ----client input ----------|
>  |                     processor (3)
>  |                          |
> XSL(1)------yes-------error in validation?
>                             |
>                            no
>                             |
>                     -----------------------
> XML Schema --------|   schema ref          |
>                    |  <next pi>            |
>                    | <root>                |
>                    |                       |
>                    |                       |
>                    |<element>              |
>                    |                       |
>                    |                       |
>                    |      </root>          |
>                    |                       |
>                    -----------------------
>                              |
>                              |
>                             (5)
> 
> (this drawing is ok in Outlook).
> 
> (4)                                -----------------------
> XML Schema --------|   schema file ref          |
>                                    |                                  |
>                                    | <xml>                       |
>                                    |                                  |
>                                    |                                  |
>                                    |<schema element ref/>| (2)
>                                    |                                  |
>                                    |                                  |
>                                    |      </xml>                 |
>                                    |                                  |
>                                    -----------------------
>                                                    |
>              ----client input ----------|
>              |                             processor (3)
>              |                                     |
>           XSL(1)------yes-------error in validation?
>                                                    |
>                                                   no
>                                                    |
>                                    -----------------------
> XML Schema --------|   schema ref               |
>                                    |  <next pi>                 |
>                                    | <root>                      |
>                                    |                                  |
>                                    |                                  |
>                                    |<element>                  |
>                                    |                                  |
>                                    |                                  |
>                                    |      </root>                |
>                                    |                                  |
>                                    -----------------------
>                                                    |
>                                                    |
>                                                  (5)
> 
> Let's see what is missing now:
> (1) need all the stylesheets for all clients.
> (2) We need to define general tags for inserting references to the
>       schema in the xml. They are needed by (1).
> (3) Need a processor that uses a schema validator and validates.
> (4) XForms schemas are different from normal schemas.
>      We need an XSL that maps between the two.
> (5) I think basic ones are needed, like an SQL insertor or XML insertor
>      (there are implementations, we just have to tweak them).
>      I think a redirector is very important.
> 
> As you see I haven't discussed about how the client interacts, if he
> sends xml or single nodes. I think that it is not that important for
> now as long as the data gets to the server...
> Sending Xml is important when the amount of data sent is not known
> beforehand (arrays). I needed it myself once but imho it is 1% of 90%
> of forms.
> 
> Here transactions are not discussed; I think that they should be taken
> care of in (5).
> 
> Please let me know what you think of this.

I like your abstract approach and, to be honest, I didn't think about
this hard enough to come up with enough knowledge to see how this
interacts with mine... so I'll let this percolate thru for now...

Many others have something to say about this?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message