AnsweredAssumed Answered

optional elements with minOccurs 0 doesn't work?

Question asked by bjornl on Jun 8, 2007
Latest reply on Jun 19, 2007 by bjornl
Hi,

I want to create optional elements in my web forms.
I've defined a form something like this:


<xs:complexType name="myType">
  <xs:sequence>
    <xs:element name="name" type="xs:normalizedString"/>
    <xs:element name="value" type="xs:normalizedString"/>
  </xs:sequence>
</xs:complexType>


<xs:element name="theName" type="myNS:myType minOccurs="0" maxOccurs="1"/>


Now in my form the "theName" element in the form is still required and I cannot save the form until I add it. Is this not the way of making optional elements? Did anyone come into this "problem"? Or anyone has a solution for it?

I am doing this on Alfresco 2.0.1 Enterprise

Regards,
Björn

Outcomes