cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject using Schemas for Form validation
Date Sun, 25 Jun 2000 14:01:13 GMT

I am (still) planning a TagLib to handle the interaction between html forms
and XML files on disk. Hopefully a TagLib version of Donald's XMLForm.

I was planning a "constraint" mechanism to allow the author to set up tests
on the input that have to be passed before data is written.

It was set up in such a way that a set of parameters defining a contraint
are passed both to the constraint engine and output to the XSL so that a
client-side JavaScript can be assembled.

I just started looking at the possibility of using Schemas instead.
It would save me a lot of work and be more standards compliant.

What I want to be able to do, is to validate the working node each time I
add to it, so I can report the error in the output.

As I understand it, I would have to reference a Schema in my data.xml, and
when I load it I would make a RevalidatingDomParser, and call
validate(Node) each time I modified it. The Dox say it will revalidate the
tree against the current DTD, I hope that also means it will handle a
Schemas .... though I can't imagine it will be too fast, validating the
whole tree over and over as you modify it.

If this is all OK so far ....

My question is this:

How do you build a JavaScript for client-side form checking without
duplicating information from the Schema? In the previous scheme the TagLib
knows all about the constraint parameters and can pass them wherever it

Are we talking generating JavaScript from a Schema ?!?

Thanks for any help

regards Jeremy

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <>     		 <>
    <phone:+44.[0].20.7737.6831>        <>

View raw message