Created
November 9, 2016 18:18
-
-
Save avernet/2df8ce6716d46711689379ab3140ae1a to your computer and use it in GitHub Desktop.
Itemset pointing to non-relevant nodes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" | |
xmlns:xf="http://www.w3.org/2002/xforms" | |
xmlns:xxf="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"> | |
<xh:head> | |
<xf:model> | |
<xf:instance> | |
<instance> | |
<choice/> | |
<colors> | |
<color>red</color> | |
<color>blue</color> | |
</colors> | |
</instance> | |
</xf:instance> | |
<xf:bind ref="colors/color" relevant="not(exists(@reasonable[. = 'false']))"/> | |
</xf:model> | |
</xh:head> | |
<xh:body> | |
<xf:select1 ref="choice" appearance="full"> | |
<xf:label>Your choice of color</xf:label> | |
<xf:itemset ref="../colors/color"> | |
<xf:label ref="."/> | |
<xf:value ref="."/> | |
</xf:itemset> | |
</xf:select1> | |
<xf:trigger> | |
<xf:label>Remove unreasonable choice</xf:label> | |
<xf:insert ev:event="DOMActivate" | |
context="colors/color[. = 'red']" | |
origin="xf:attribute('reasonable', 'false')"/> | |
</xf:trigger> | |
</xh:body> | |
</xh:html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment