All,
I don't think this email ever had a follow-up. This could be interesting though. The hardest part for implementation is hooking up to the Schema validator (right now we are using Sun's MSV) to extract detailed simple type information. This would then be bassed by the XForms engine to the stylesheet in charge of formatting XForms controls, which would then be able to hookup any JavaScript you want. That last part sounds easy enough in theory.
(Not sure what was meant by "pull an XForms instance twice".)
-Erik
[EMAIL PROTECTED] wrote:
>
> Hi All
>
> There are two layers of implementation to consider:
> 1) Correctness of data processed
> 2) User Experience when using an XForm
>
> for 1) the server side processing looks reasonable (anyway not my core
> expertise).
> for 2) there are "a lot" of considerations you can make to make the
> userexperience more pleasurable. While you can't get away with server
> side validation (at last someone could post "homegrown" html against
> your url) there is a case for client side validation to make the
> experience more pleasurable.
>
> What could be done:
> - Extract the max length for an input and convert it into the maxlength
> attribute.
> - Extract the fact if it is required/mandatory and
> - Extract the datatype. Combine the two to the class attribute eg
> "required-text" "datetime" "required-socialsecno"
>
> Then with the help of some generic JavaScript you could prevalidate the
> values for known data types in the browser. I can post sample JS if needed.
> Then: Let an XLST add a JavaScript routine that has been created from
> the actual instance/model/schema to provide additional validation (e.g
> Range of values). This would be an interesting challenge to create
> XSTL/Js that is a bit smart about it.
> With this approach you could reduce the number of server roundtrips and
> make the UI a more pleasant experience.
>
> I would need some feedback from the XForms/Schema experts to find out:
> - Can the information (suggested above) be extracted from XForms/Schema
> easily? And where to pull it from?
> - Can we pull an XForms instance twice? One time as the xHTML form and
> the second time (triggered by JavaScript src= in the form) as JavaScript.
>
> Thoughts please!
> :-) stw
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user
