- From: Frederik Elwert <felwert@uni-bremen.de>
- Date: Thu, 18 Oct 2007 15:49:29 +0200
- To: www-forms@w3.org
Hello!
I just was wondering how I can test for a specific listItem in a
variable of type xforms:listItems.
I have a select that offers several options:
<select ref="flavors" appearance="full">
<label>Flavors:</label>
<item>
<label>Vanilla</label><value>v</value>
</item>
<item>
<label>Strawberry</label><value>s</value>
</item>
<item>
<label>Chocolate</label><value>c</value>
</item>
</select>
Now I have another item that should test if "Chocolate" was chosen, e.g.
in a "relevant" property. How can I achieve this?
Using XPath functions as "contains()" seems a bit strange, since I could
have values like "a" and "ab", so
contains(flavors, 'a')
would match "a" as well as "ab".
Is there a proper way? I can't use structured markup and itemset, since
I need HTML forms compatibility.
Thanks,
Frederik
Received on Thursday, 18 October 2007 13:49:38 UTC