Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: inquiry into the >Thread Next - Re: A bug or incorrect logic? A bug or incorrect logic?To: xmlschema-dev@--.--- Date: 10/31/2008 5:26:00 PM
I have a complex-type defined as follows:
<xsd:complexType name="PersonNameType">
<xsd:sequence>
<xsd:element name="PersonPrefixName"
type="PersonPrefixNameType" minOccurs="0" maxOccurs="1"/>
<xsd:choice>
<xsd:element name="PersonFirstName"
type="PersonGivenNameType" minOccurs="1" maxOccurs="1"/>
<xsd:element name="PersonGivenName"
type="PersonGivenNameType" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
<xsd:element name="PersonMiddleName"
type="PersonMiddleNameType" minOccurs="0" maxOccurs="1"/>
<xsd:choice>
<xsd:element name="PersonLastName"
type="PersonSurNameType" minOccurs="1" maxOccurs="1"/>
<xsd:element name="PersonSurName"
type="PersonSurNameType" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
<xsd:element name="PersonSuffixName"
type="PersonSuffixNameType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="PersonMaidenName"
type="PersonMaidenNameType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="PersonFullName"
type="PersonFullNameType" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
When testing with an instance where the SignerName element
is of type PersonNameType, and is deliberately kept empty
(as follows):
<SignerName/>
the XML Schema tool gives me the following error:
cvc-complex-type.2.4.b: The content of element 'SignerName' is not
complete. One of '{PersonPrefixName, PersonFirstName, PersonGivenName}'
is expected. [129]
However, the PersonPrefixName has a minOccurs of "0", so
why am I seeing an error where the tool insists that the
PersonPrefixName is expected?
Thanks.
Arshad Noor
StrongAuth, Inc.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
