cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@STJUDE.ORG>
Subject RE: [cforms] xreporter expressions on (Avalon) steroids
Date Wed, 21 Jul 2004 15:51:08 GMT
Gianugo Rabellino <gianugo@apache.org> writes:

> I'm currently working on a more-than-average sized cforms 
> applications. We have quite a few usecases where validation 
> is kind of a PITA, requiring quite a few of business logic to 
> be performed. Nothing difficult, nothing that requires heavy 
> algos to be created, but still (as an example) quite a bit of 
> interaction with datasources to check for data consistency.
> 
> So far, we have been using Javascript, but I'm feeling we 
> would hit a wall very shortly since the road to spaghetti 
> code is dangerously close. OTOH, writing our own validators 
> is kind of overkill: as I said before, the current usecases 
> are more convoluted than complex, and in most cases what we 
> need is "chaining" different validation rules rather than 
> write monolithic ones.
 
<snip>xReporter discussion which I know nothing about</snip>

If you can do back end validation (full round trip) then you may want to
search the archives for the flow script sample I posted for running
Schematron validation.  

We've built up a Flash based Schematron rule editor that allows storing
of metadata for Schematron validation in our database.  Our code is not
applicable directly to cForms but I can attest that the general
principle works very well.  In addition, if you run Schematron under XSL
2 (eg. Saxon 7) you gain the ability to write regex and exploit xPath 2
in your Schematron rules.  The latter can be used to do things like
validate one element against multiple pieces of data from another
element (eg. does the given surgery date fall after any of the
applicable diagnosis dates).

If you're interested in pursuing this further I may be able to provide
additional help and info.



Mime
View raw message