Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: XML Schema Validation >Thread Next - RE: XML Schema validation doesnt throw some basic errors? XML Schema validation doesnt throw some basic errors?To: xmlschema-dev@--.--- Date: 1/10/2007 3:09:00 AM
Hi,
I am using xerces to validate my xml against my schema. I noted that the
schema validation was missing the following 2 basic validations. Is this
something wrong with my code/schema or is this not possible?
1) If a complex type has 10 elements which are defined as mandatory in my
schema. In my xml instance
if I put only the 10th element, on validating this against the schema, I get
only 1 error saying that 'found {10th element} while expecting 9th element.
It doent say that the other 8 elements were missing. I've enabled
full-schema-checking. I want to collect all errors at one go and dont want
to get one error at a time. Is there a way to achieve this?
2) If i put a junk element which is not at all defined in the schema just
before closing my <root> tag, the schem validation doesnt catch this. For
eg: in the below xml
<root>
<element_defined_in_schema_1>..</element_defined_in_schema_1>
....
....
<element_not_defined_in_schema>junk</element_not_defined_in_schema>
</root>
schema validation doesnt throw an error saying that
"element_not_defined_in_schema" is not a valid one.
Thanks in advance..
--
View this message in context: http://www.nabble.com/XML-Schema-validation-doesnt-throw-some-basic-errors--tf2954521.html#a8264187
Sent from the w3.org - xmlschema-dev mailing list archive at Nabble.com.
From mike@s... Wed Jan 10 20:39:03 2007
Received: from aji.w | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
