I've noticed that when I have a schema element that
uses a restriction i.e.:
<xs:element name="complex_action" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="add_agonist"/>
<xs:enumeration value="add_antagonist"/>
<xs:enumeration
value="change_biomaterial_characteristics"/>
<xs:enumeration value="genetic_modification"/>
<xs:enumeration value="incubate"/>
<xs:enumeration value="infect"/>
<xs:enumeration value="irradiate"/>
<xs:enumeration value="split"/>
<xs:enumeration value="starvation"/>
<xs:enumeration value="transfect"/>
<xs:enumeration value="wash"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
That when the appropriate pedro form field pops up for
this, it has the string "None" as one of the available
options in the pull down list. However, when this saves
to the final submission format we get (e.g.):
<Treatment >
<complex_action>None</complex_action>
</Treatment>
rather than:
<Treatment >
</Treatment>
as would be expected.
The main poroblem here is that the XML database I'm
saving to does a check "None" is a valid element within
the restriction, and of course it isn't, and so rejects
the insert.
You need to stop being quite so helpful for optional
elements that have a restricted vocabulary, and just
leave the field blank, I think :-)
Tony