Page 1 of 1

Validating XML against Schema and DTD at the same time...

Posted: Mon Oct 10, 2005 6:30 am
by ychaikin
I seem to remember that OxygenXML doesn't do validation of both at the same time, but will only validate against one or the other. (I think DTD will validation will fire automatically... can't remember).

Am I wrong about this? If the XML is declared with both DTD and Schema, then clicking on the "Validate" button will validate against both???

I seem to remember that I asked this before and was answered that this is not possible.

Could someone verify this? Is this a new feature in 6.x?

Thanks,
Yaakov.

Posted: Mon Oct 10, 2005 8:53 am
by george
Hi Yakoov,

There is notthing new in this area since some time. By default oXygen will validate against the DTD. If you want to validate against the schema you can use the External validation action or you can configure the editor to always validate against the schema (the DTD will be used for entities). For that go to Options->Preferences -- XML / XML Parser Options and enable the "Use only XML Schema for validation" option.

Best Regards,
George

Posted: Mon Oct 10, 2005 8:22 pm
by Kalman
George,

This is quite interesting.

I have an xml file with a DTD and schema in the same directory. When I click the validation button (in Oxygen Eclipse plug-in) I am seeing errors for both DTD and the schema in the Problems view.

Am I not validating the xml file against DTD and schema at the same time?

Thanx,
- Kalman

Posted: Tue Oct 11, 2005 10:37 am
by george
Hi Kalman,

Hmmm... By default Xerces used to validate only against the DTD when both a DTD and an XML Schema were specified. However in the latest version included also in oXygen 6.2 this behavior has changed and now validated against both. You can validate against XML Schema only while still using the entiries defined in the DTD if you enable the "Use only XML Schema for validation" option.

Best Regards,
George