Ronald van Kuijk wrote:
joern turner wrote:
Ronald van Kuijk wrote:
<snip/>
> All kinds of constraints that are possible in a scheme. Length,
regexp,
> etc.... We have e.g. a schema where we've defined a 'licenceplate'
> element which has a regexp for the exact allowed format e.g.
> "[A-Z0-9]-[A-Z0-9]-[A-Z0-9]" I'd like these to be automagically
used in
> the generated html page. This requires schema2xforms to detect
those and
> pass them over into the xform (if that is possible) and then by
adapting
> the xslt, and using some javascript library (already available
here and
> resuable) have these checked on the client-side. I do not a a
complete
> list yet. Maybe we should set up a wiki to have a more structured
> approach to this.
For the validation, shouldn't that be easy using Xerces? since most
of it is already supported.
If you only have a server-side validation yes, but I'd like to have
these validations done on the client-side as well, so it saves
roundtrips to the server
do you see any chance to achieve this on a browser client? i've
considered schema validations on the client as much too expensive up
to now. - please enlighten me ;)
Joern
Sorry, yes, this is what we discussed earlier by having the
schema-constraints and or some xforms constraints (e.g. length) be
converted to javascript calls in html with help from the xslt. e.g.
one-pass: schema -> schema2xforms -> xforms with all constraints -> xslt
-> html+javascript
two-pass: schema -> schema2xforms -> xforms with some constraints ->
xslt + original schema -> html+javascript
ah, ok. but this only applies to item validations and not the structural
validation that schema provides. this was the part i consider
problematic but also maybe not that important. it would be a tremendous
step forward to have these item validations on the browser.
Which one is possible depends on the kind of constraints that can be put
in an xforms document. I think (but do not know xforms well enough) the
second option is needed. e.g. can a regexp like mentioned above be in an
xforms document, or not (which I assume, since an xforms document
already references a schema it's duplicate to put these contraits also
in the xforms document)
yep. you can link the schema and let it do the work or alternatively (if
schemas seem to be too much) put it directly in the xforms.
Joern
Ronald
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
|