Page 1 of 1

XSD & XML Validation Problems

Posted: Fri Sep 10, 2004 2:47 am
by bwinspur
I am running eclipse 3.0.0 on XP Pro, using Oxygen 4.2.0.

I've had problems with xsd and xml validation that are not due to my xsd and xml code. I can make the errors go away without changing the code. The problems are difficult to reproduce on demand, but here are a couple of examples.

1.In xsd I added the attribute used=”required ” to the node attribute definition.
The xsd validated OK.
A test document, missing the node attribute, validated OK, which was wrong.
I forced an error in the test doc (by misspelling the element name), on the element missing the node attr.
Validation detected my forced error, and did not detect the missing node attr, as expected.
I fixed the forced error.
Validation finally detected the missing node attribute.

2.Occasionally validation on the xsd or the xml produces several ridiculous errors.
I boot eclipse.
Validation shows a clean xsd and xml.

In these situations, I do not have to change my code to get things working, so I suspect bugs, like the validator is depending on stale data. Reboot, or forcing it to refresh its internal data somehow, appears to be the workaround.

Sorry its not a good test case,

Bill.

Posted: Fri Sep 10, 2004 8:23 am
by george
Hi Bill,

Just make sure you save the schema file after you make changes to it. Oxygen will get it from disk when you perform a validate action on the instance document.

If you will have this problem again send us the XML and schema files if possible at support@oxygenxml.com.

Best Regards,
George