Schema and DTD in document type association

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ra0543
Posts: 80
Joined: Wed Jan 14, 2009 12:50 pm

Schema and DTD in document type association

Post by ra0543 »

It's quite standard practice, I think, if using schema for validation, also to declare a DTD for entities. I can do both fine within an XML file. I am now looking at whether I can make use of Document Type Associations in Oxygen so that I don't have to declare my Schema, DTD, CSS etc. explicitly within every file. I have a few questions.

When I set up a Document Type Association, if I have put entities in an external DTD, can I refer to this as well as the Schema that I am using for validation?

Or must I still declare that external DTD separately in every instance file if I want to use to my Schema in the Document Type Association?

And, in fact, if I do declare (in every XML instance file) a DTD which contains only entities, will that declaration then cause the Schema set in the Document Type Association | Schema tab (where it does say 'The schema defined here is used only if there is no schema detected in the XML file.') to be ignored, meaning that I then have to declare the Schema in each instance file anyway?

Any guidance on how this common situation is best handled with Oxygen would be appreciated.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Schema and DTD in document type association

Post by george »

The best approach to this is to set both the DTD and the schema in the document.

Putting the DTD outside will cause you a lot of trouble trying to process that as you need to set up each processing workflow to handle this situation.

After putting the DTD inside is not easy to trigger the schema validation and block the DTD validation.

In the next oXygen release (after Easter) we will allow setting a default validation scenario at Document Type (framework) level so you should be able to force the schema validation even if your document specifies a DTD. But, at least in 12.1 we will not use that schema for content completion so it will solve only half of the problem... so my advise is to stay with how you are using them right now.

Best Regards,
George
George Cristian Bina
Post Reply