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

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ychaikin
Posts: 20
Joined: Thu Sep 09, 2004 9:23 pm

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

Post 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.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
Kalman
Posts: 1
Joined: Mon Oct 10, 2005 8:18 pm

Post 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
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
Post Reply