Skip to content

Instantly share code, notes, and snippets.

@avernet
Created October 24, 2011 03:27
Show Gist options
  • Save avernet/1308302 to your computer and use it in GitHub Desktop.
Save avernet/1308302 to your computer and use it in GitHub Desktop.
Bind order
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xhtml:head>
<xhtml:title>Bind order</xhtml:title>
<xforms:model>
<xforms:instance id="form">
<instance>
<some-node/>
</instance>
</xforms:instance>
<xforms:bind nodeset="instance('form')//*" required="true()"/>
<xforms:bind nodeset="instance('form')/some-node" required="false()"/>
</xforms:model>
</xhtml:head>
<xhtml:body>
<xforms:input ref="some-node">
<xforms:alert>Required</xforms:alert>
</xforms:input>
</xhtml:body>
</xhtml:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment