cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ivelin" <>
Subject Re: XMLForm & JSF
Date Wed, 09 Apr 2003 03:36:51 GMT

Thanks for the feedback, Peter and Bruno.

It is just my opinion based on experience, but I would like to hear other
points of view.

The recommended practice for validation with XMLForm is to apply two stage
validation. First stage is lightweight and evaluates only rules refering to
the form model itself. Examples are verifying whether a field is a number
within a predefined range or a valid email address. Use Schematron for
lightweight validation. The second stage, when necessary, is heavier in the
sense that it consults with data storage or remote sources of information to
evaluate a rule. This validation stage is usually specialized to the problem
domain and is best implemented with the appropriate tools at hand.

Does this make any sense?

Localization is not built in Schematron and I am not sure that it should be.
Here is an email from Rick Jeliffe, the Schematron author, that addresses
the issue:
He simply recommends that schemas should be written for each language.
German schema for german rules with german text, english for english, etc.
What that means for XMLForm is that there needs to be a mechanism to lookup
Validator with associated schema per locale. This is already available in
Commons Validator, but the solution seems somewhat counterintuitive to me.


----- Original Message -----
From: "Hunsberger, Peter" <>
To: <>
Sent: Tuesday, April 08, 2003 10:01 AM
Subject: RE: XMLForm & JSF

> ivelin <> asked:
> >
> > I kept evaluating the commons validator and looking for
> > examples. I might be wrong, but it doesn't seem like a very
> > intuitive and straightforward tool to use. After a few days
> > of learning it is still not clear to me how to set it up and
> > use for different scenarios. What is your impression. Is the
> > validator really as popular and widely used as the basic
> > Struts itself? When a friend of mine pointed me to the
> > Schematron home page some time ago, it only took me a few
> > minutes to understand the concept and how to use it. I liked
> > immediately.
> >
> > Comments?
> > Has somebody else used both validation techniques to compare?
> >
> I haven't used commons validator, but I agree. I looked at it and just
> up; Schematron seemed like a much better way to go and we are now heading
> towards using it for much of our validation in the long run.  I'd say all,
> but there are still things that are hard to do in Schematron and it's not
> clear that we can do everything we want with just Schematron. We may have
> introduce some local extensions, it's not clear if that would be true with
> commons validator, I suspect not...

View raw message