- From: Flinton Adam <Adam.Flinton@cfh.nhs.uk>
- Date: Wed, 7 Jun 2006 11:00:10 +0100
- To: <www-forms@w3.org>
Dear All, Hopefully this is something which is one of those "so simple it hurts" questions. One the assumption that Xforms uses the Xpath Comparison Expressions as laid out at : http://www.w3.org/TR/xpath20/#doc-xpath-NodeComp 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. TIA Adam <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()" appearance="minimal"> <xforms:label>ISO Root :</xforms:label> <xforms:hint>Where the ISO Root goes</xforms:hint> <xforms:item> <xforms:label>1.2.826.0.1285.0</xforms:label> <xforms:value>1.2.826.0.1285.0</xforms:value> </xforms:item> <xforms:item> <xforms:label>2.16.840.1.113883.2.1</xforms:label> <xforms:value>2.16.840.1.113883.2.1</xforms:value> </xforms:item> </xforms:select1> <xforms:input bind="OID_suffix" incremental="true" id="OIDSUFF"> <xforms:label>OID Suffix :</xforms:label> <xforms:hint>Where the OID Suffix goes</xforms:hint> <xforms:help>Put a valid OID suffix here</xforms:help> <xforms:alert>An OID may only consist of numbers separated by periods (.) </xforms:alert> </xforms:input> </xforms:case> <xforms:case name="noteditable" condition="OID_key eq 0"> <xforms:output ref="ISO_Root/text()"> <xforms:label>ISO Root :</xforms:label> <xforms:hint>The ISO Root</xforms:hint> </xforms:output> <xforms:output bind="OID_suffix"> <xforms:label>OID Suffix :</xforms:label> <xforms:hint>The OID Suffix</xforms:hint> </xforms:output> </xforms:case> </xforms:switch> 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