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= "" the form) as _javascript_.

Thoughts please!
:-) stw

[EMAIL PROTECTED] wrote on 21/10/2004 18:26:52:

> Micah Dubinko wrote:
>
>  > Erik Bruchez wrote:
>  >
>  >> We could support embedding XForms models in page views only in certain
>  >> circumstances (static XHTML), or we could determine that if an XForms
>  >> model is embedded in XHTML, it supercedes an XForms model declared in
>  >> the Page Flow. The processing would be:
>  >>
>  >> Run view -> XForms engine detects embedded model -> XForms engine
>  >> processes model / instance as per spec.
>  >>
>  >> Now this breaks the page model, which was expecting access to an
>  >> XForms instance, with default values filled-in, etc.
>  >>
>  >> Thoughts?
>  >
>  >
>  > I don't think a server-side engine should have to go out of its way
>  > to support inline-models. So, how about the current out-of-line
>  > XForms Model? Can that contain an <xs:schema> element with one or
>  > several <simpleType> definitions that can be used in the form, for
>  > example to limit entry to 20 characters?
>
> The entire XForms instance can be validated with a schema. The BizDoc
> example illustrates this. When validation errors are limited to simple
> types, we intercept those and mark the relevant elements as
> invalid. This has limitations: it does not validate attributes, and we
> depend on the Schema validator reporting errors correctly.
>
> As far as importing schemas and using those types directly in the
> XForms instance, this is not yet possible. It would be fairly easy to
> do, assuming the Schema validator allows access to access simple type
> definitions and validate them.
>
> -Erik
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> orbeon-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to