File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XSD parsing errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSD parsing errors" Watch "XSD parsing errors" New topic

XSD parsing errors

joey mo

Joined: Mar 31, 2010
Posts: 9
im getting unknown element for every single element tag in my xml..

im also getting this error Message: The content of an element information item does not match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)

id first like to understand what these errors mean
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10425

It means that your xml does not follow the rules set down by your schema in the xsd. What does you xml file and the xsd look like?

[My Blog] [JavaRanch Journal]
joey mo

Joined: Mar 31, 2010
Posts: 9
my namespace ended up being the problem.. but my schema doesnt seem to be active.

here is a snipent that is meant to restrict value of option but doesnt seem to do so..

and my xml looks like this
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
In your element definition for the OPTION element, you have not defined a TYPE attribute.

You seem to be confusing the TYPE attribute of the XML Schema Language with a TYPE attribute of the OPTION element. These are not the
same. I suggest for your initial learning period, rename the OPTION element's TYPE attribute to O_TYPE. This may help you understand
what you are attempting to do.

You also are not correctly defining the OPTION element's type and your schema contains errors.
joey mo

Joined: Mar 31, 2010
Posts: 9
Thank you.
yes i was getting them mixed up :S

just wondering also if this is possible to..
set a limiting on how many times element can be made

because everytime i try <xs:element option minoccur="10" maxoccur="20"/> i get errors in my parser saying cannot put that in global element.
I agree. Here's the link:
subject: XSD parsing errors