cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivelin Ivanov" <>
Subject Re: [Announcement] HTML Form binding and validation arrived
Date Fri, 15 Mar 2002 00:44:04 GMT

Thanks folks.

One line goes a long way. When I released v0.5 a week ago, I got almost no
feedback and was about to drop it.

Hope my words didn' go much farther than the code they promote. I'll find
out soon ... ;-)


..see below...

----- Original Message -----
From: "Jeremy Quinn" <>
To: <>
Sent: Thursday, March 14, 2002 5:32 PM
Subject: Re: [Announcement] HTML Form binding and validation arrived

> At 3:31 pm -0600 14/3/02, Ivelin Ivanov wrote:
> >===============================================================
> >! The HTML Form symmetry loop is closed: !
> >===============================================================
> >HTML Forms <-> XPath <-> JavaBeans <-> XML -> Schematron ->
HTML Forms
> >===============================================================
> >

> I have the feeling you could get Cocoon to generate the validating
> StyleSheet on the fly using an internal pipeline.

I would like to do it. Can you script up a few lines to give me direction.
As everyone have noticed, I'm a Total newbie with sitemaps.

For the wizard I would like to do the following, but am not sure what's the
optimal way to express it with a sitemap.
Maybe you can help:

1) When the browser request an URL with HTML form, then the pipeline in the
current example works fine.
2) Now when the browser submits the form though, I would like to pass
through the same (or similar) pipeline, but at the end, instead of going
back to the same page, I'd like to forward to another Action2 if there are
no errors in the <validationResult/> section of the <xmlform/> stream.
3) Action2 will then do additional business logic validation and will either
  a) branch to a pipeline which produces <xmlform/> with <validationResult/>
section that contains <errors/> and is followed by the same transformation
which happen in 1) to display the html form page with the errors
  b) call into business logic to perform additional work and branch to the
next page in the wizard.

What is the *right* way to branch at the end of step 2), 3.a) and 3.b)?

These questions maybe overlapping somewhat with the other thread on dynamic
pipeline selectors which is going in parallel. Anyway,

Feedback please ! :)



P.S.: To give a chance to more people to join this discussion, I'll paste
the <xmlform/> document which is used in the FormBinding and validation

<?xml version="1.0" encoding="UTF-8"?>
        <name>Mickey Mouse</name>
  <pattern name="A Simple Form Validation Pattern">
      <message>Animal name should be less than 10 characters.</message>
      <message>Scope should be request or session.</message>

> Did you try this?
> regards Jeremy
> --
>    ___________________________________________________________________
>    Jeremy Quinn                                           Karma Divers
>                                                        webSpace Design
>                                             HyperMedia Research Centre
>    <>     <>
>    <phone:+44.[0].20.7737.6831>             <>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

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

View raw message