schemas vs. bind nodesets

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

schemas vs. bind nodesets

ilango_g
Hi
I have the following question:
Why and when would I need both a schema and constraints on xforms:bind? If I do not need any additional constraints on my instance data, is it fine not to have any xforms:bind statements. The schema takes care of validating and we are done. Is that a naive assumption.



Reply | Threaded
Open this post in threaded view
|

Re: schemas vs. bind nodesets

Erik Bruchez
Administrator
You are right, if the schema specifies everything you need, then  
that's great, you probably don't need binds. Since not that long ago,  
XML Schema also annotates XML data with simple types, so if you have  
an xs:date specified in your schema the XForms engine is made aware of  
this and can display the date picker.

This said, binds allows you to specify slightly different things than  
just validation by type:

* You can have constraints expressed as XPath, including constraints  
involving values from other instance data. You can't do this with just  
XML Schema.
* Specifying readonly-ness of a node / control.
* Specifying that a field is required. In the future, we will want to  
make sure a required field can display something like a "*" next to  
it, for example.

-Erik

On Mar 19, 2008, at 12:18 PM, someperson wrote:

>
> Hi
> I have the following question:
> Why and when would I need both a schema and constraints on  
> xforms:bind? If I
> do not need any additional constraints on my instance data, is it  
> fine not
> to have any xforms:bind statements. The schema takes care of  
> validating and
> we are done. Is that a naive assumption.
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws