Keith Hopper wrote:

I will let Alex maybe give a more thorough answer. But I think that the choice of schema vs. bind is yours, depending on your particular preferences. Now, if schema validation of attributes doesn't appear to work correctly, that may just be a bug, which should be fixed.


     Hold it! There are two totally orthogonal concepts in operation here -

     Data type checking - which unfortunately goes by the name of schema
     validation in xml-based technologies - checking that the textual
     representation conforms to that required for the schema specified data
     type!.

Data validation - checking that the value (of the correct data type) is correct in the current context.

     I respectfully suggest, therefore, that type checking should always be
required since data validation can only be done if the data type
representation is meaningful. Data validation (using a bind element) may or
may not be possible at the client (assuming for the moment that OXF is
emulating an XForms client implementation) - dependent on whether the
necessary valuu(s) against which cross-checking can be made are avilable at
the client - whether, for example, the cross-checking is to be against some
'secret' only known to the server - etc, etc!

     Given the above I suggest that the only choice for application
developer is whether or not client-side data validation is possible given
the particular context in which execution is to take place.

In Presentation Server in particular, and XForms in general, as a designer of your forms, you determine whether and how they are validated. You have two ways of doing this: using an XML schema, or using XForms bind elements. This is what the question was really about, I think.


The result of this is really "data type checking" as you put it. It is really up to the developer to decide to use a schema or binds. Nobody can force him/her to do so. It's just that the mechanisms are in place. But this step should clearly be performed in any serious application, whether strictly server-side or, optionally, and in addition to server-side checking, client-side. Note that right now, Presentation Server does not offer built-in client-side validation, but this would be a very nice addition (and certainly doable, at least in part).

Validating data against a database, for example, is entirely left to the application developer to do, in a PFC action or model, for example.

-Erik


------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to