Meaningless Drivel is fun!*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSD parsing errors" Watch "XSD parsing errors" New topic
Author

XSD parsing errors

joey mo
Greenhorn

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
Marshal

Joined: Jul 20, 2005
Posts: 9924
    
158

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
Greenhorn

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
Greenhorn

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.
 
 
subject: XSD parsing errors
 
Similar Threads
XML validation with XSD in java
DOM : how to retrieve value of element
Getting 6 errors with the use of result(noob)
issues in configuring application on Websphere app server 5.x
Mailing problem