cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Spaeth <>
Subject RE: Advanced form validation using jxforms
Date Thu, 24 Jul 2003 18:15:11 GMT
Well, I have solved my own seems that jxpath has been upgraded
since I last browsed the docs and java functions can be directly called from
Therefore, with the jdk 1.4, I am able to do the following within my schema:
  <rule context="timestamp">
   <assert test="string-length(.) &gt; 0">Enter a the date and
   <!-- date format: mm-dd-yyyy hh:mi am|pm -->
\s+[ap]m\s*$', .)">Enter the date and time in the proper format.</assert>

Just thought I'ld share the solution to the problem I posted regarding
validation using regular expressions!

-----Original Message-----
From: Jonathan Spaeth [] 
Sent: Thursday, July 24, 2003 10:12 AM
To: ''
Subject: Advanced form validation using jxforms

I have been working on a set of cocoon apps for the past three or four
months now. The basic idea is simple data management; replacing a large
number of spreadsheets with sql-database-driven apps using cocoon and
jxforms (originally xmlform, but I migrated when jxforms became available).

The problem or issue I have recently come across is the need to do more
advanced form validation than is easily doable with the standard set of
xpath functions.  Specifically, if some type of regular expressions
functionality were available to the schematron validator system, the
validation system would be much more powerful.

Currently, (as far as I know; please correct me if I'm wrong), the only way
to register a jxpath extension function is by manipulating java code.  If
the validator classes were modified to ... Say ... Register a java class to
use as a jxpath extension function by associating it with a namespace within
the schematron xml document, I believe we could obtain some regular
expression matching or validation within the jxforms validator.

Any questions or suggestions or comments? 


View raw message