W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2003

RE: xml schema validation using Xerces 2.4.0

From: Colin Mackenzie <colin@elecmc.com>
Date: Mon, 12 May 2003 17:04:56 +0100
To: "Anitha Chandran" <anithacd@hotmail.com>, <xmlschema-dev@w3.org>
Cc: <anithacd@hotmail.com>

Hi Anitha,

if minOccurs="0" is on the element "USAddress" then you are saying that
either you have the element or you don't (not that is has or has not any

If your XML instance has no "USAddress" element, I suspect you will not get
a parsing error.


-----Original Message-----
From: xmlschema-dev-request@w3.org
[mailto:xmlschema-dev-request@w3.org]On Behalf Of Anitha Chandran
Sent: 12 May 2003 16:24
To: xmlschema-dev@w3.org
Subject: xml schema validation using Xerces 2.4.0

I am doing an xml schema validation using xerces 2.4.0.

I have a complex type "USAddress" which has other child elements inside .
Now, this is optional. So sometimes, I get just the tag <USAddress/>..
without any child elemets inside.
which is valid, as per the requirements.

I have specified that USAdress is optional ( minOccurs = 0" in my schema- i
use xmlspy to create and edit schemas.
Irrespective of this, on encountering this tag, i get the following error.

[Error] POCRConvert1.xml:138:19: cvc-complex-type.2.4.b: The content of
'UsAddress' is not complete. One of '{"":StreetNumPrefix, "":StreetNumber,
reetNumberSuffix, "":StreetDirectional, "":StreetName}' is expected.

Can anyone let me know how ti solve this?


IIFA Awards. Vote now.
http://server1.msn.co.in/msnspecials/iifa2003/index.asp Celebrate Indian
Received on Monday, 12 May 2003 12:15:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:11 UTC