• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSD parsing errors

 
joey mo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
joey mo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic