Hello,

We have XML schemas that extensively rely on the use of attributes rather than create elements for properties of entities (like name of person). When validating forms I wish to have the input control decorated as well as my instance document include the xxforms:valid="false" if validation fails. This can only be achieved - assuming we have a 'person' entity with dateOfBirth and name both having some simple validation for the content - like the followings:
<xforms:bind nodeset="/form/document/person" constraint="./@name != '' and ./@dateOfBirth != ''"/>
    <xforms:bind nodeset="/form/document/person/@name" constraint=". != ''"/>
    <xforms:bind nodeset="/form/document/person/@dateOfBirth" constraint=". != ''"/>
It is obvious from the source above that the validation is duplicated which is not preferable. Is there some solution to avoid this redundancy that we have overlooked or should we design XML schemas with using elements instead of attributes ?

regards,
Balázs

Reply via email to