I have a question about attributes which have required values, but the attribute itself is optional. I'm attempting to bind an XForm checkbox to an attribute, called keyDate, which is defined in the following Schema: <xsd:attribute name="keyDate" use="optional"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="yes"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> So the only valid instance document would be one where the keyDate attribute is absent, or one where it is present and contains "yes" as the value. My preferred behavior for this would be the production of an instance document without the attribute when the box is unchecked, but if checked the attribute's value would be set. Is this possible? Have others come up with solutions for this scenario? If it helps, below is my XForms control, as it is used in OPS: <xforms:select ref="@keyDate" appearance="full"> <xforms:label class="fixed-width attribute">keyDate: </xforms:label> <xforms:item> <xforms:label>yes</xforms:label> <xforms:value>yes</xforms:value> </xforms:item> </xforms:select> Duane GranReceived on Wednesday, 1 February 2006 22:56:15 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:01:57 GMT