Rationale Orbeon Forms validates XForms instances following XForms 1.1 and adds some extensions to facilitate validation.Validation methodsThere are two main methods for validating data in XForms:
[TODO: document, examples] Validation orderOrbeon Forms performs validation of a node in the following order:
Once a given node is marked as invalid, further validation is not performed. E.g. if a node's type is invalid, then @constraint is not evaluated. [TODO: example] [TODO: example] XML Schema validation[TODO: document] Validation and submission[TODO] Validation and controls[TODO] ExtensionsExtension eventsOrbeon Forms supports extensions events dispatched to an instance when it becomes valid or invalid:
These events are dispatched just before These events can be used, for example, to toggle the appearance of icons indicating that a form is valid or invalid:
Extension XPath functions
Extension typesOrbeon Forms supports the built-in
Note that this checks the string value of the node, which means that the node must contain escaped XML. Orbeon Forms supports the built-in
NOTE: In both these cases, Orbeon Forms checks for the Controlling the XML Schema validation modeWhen an XML Schema is provided, Orbeon Forms supports controlling whether a particular instance is validated in the following modes:
Orbeon Forms implements a "lax" validation mode by default, where only elements that have definitions in the imported schemas are validated. Other elements are not considered for validation. This is in line with XML Schema and XSLT 2.0 lax validation modes, and with the default validation mode as specified in XForms 1.1 In addition, the author can specify the validation mode directly on each instance with the extension
Nodes validated through a schema receive datatype annotations, which means that if an element or attribute is validated against |