W3C home > Mailing lists > Public > www-forms@w3.org > June 2006

Hopefully simple question wrt case

From: Flinton Adam <Adam.Flinton@cfh.nhs.uk>
Date: Wed, 7 Jun 2006 11:00:10 +0100
Message-ID: <595299DD7F30014BBCE48B93DCB6065204263997@EXCHAQ2.nhsia.nhs.uk>
To: <www-forms@w3.org>

Dear All,

Hopefully this is something which is one of those "so simple it hurts"

One the assumption that Xforms uses the Xpath Comparison Expressions as
laid out at :


I am trying something which hopefully fairly simple. I have tried other
ways of phrasing this but find my most recent example below.

In essence we have a requirement that once an OID is set, it can not be
edited again. As such we have an element called OID_key which carries an
integer which is either 0 (is set thus not editable) or 1 (is not yet
set & thus can still be edited).

What I want is for the form to evaluate OID_key & if not 0 then allow
edits (i.e. use input fields), if 0 then display the fields as outputs
(i.e. not editable)

Any ideas? Having been messing about, I have a strong feeling I am
simply small string from success.



<xforms:bind nodeset="OID_key" id="OID_key" type="xsd:integer" />

	<xforms:switch name="render">
		<xforms:case name="editable" condition="OID_key ne 0">
			<xforms:select1 ref="ISO_Root/text()"
				<xforms:label>ISO Root :</xforms:label>
				<xforms:hint>Where the ISO Root

			<xforms:input bind="OID_suffix"
incremental="true" id="OIDSUFF">
				<xforms:label>OID Suffix
				<xforms:hint>Where the OID Suffix
				<xforms:help>Put a valid OID suffix
				<xforms:alert>An OID may only consist of
numbers separated by periods (.) </xforms:alert>
		<xforms:case name="noteditable" condition="OID_key eq
			<xforms:output ref="ISO_Root/text()">
				<xforms:label>ISO Root :</xforms:label>
				<xforms:hint>The ISO Root</xforms:hint>

			<xforms:output bind="OID_suffix">
				<xforms:label>OID Suffix
				<xforms:hint>The OID


This e-mail is confidential and privileged. If you are not the intended recipient please accept our apologies; please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation.
Received on Wednesday, 7 June 2006 10:00:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:17 UTC