difference between Schema and DTD
1 posts in topic
Flat View  Flat View

Posted By:   devaki_perumal
Posted On:   Friday, May 4, 2001 11:19 PM

when we can go for Schema and when for DTD

Re: difference between Schema and DTD

Posted By:   Anonymous  
Posted On:   Saturday, May 5, 2001 05:02 PM

It depends on what you need and what you want to achieve:

The DTD (Document Type Definition) defines the valid syntax of a class of XML documents. It contains all the elements that can appears inside the document, with their attributes that they will accept and their nested elements.

The Schema uses a very rigorous and formal way to describe the possible data content of an XML document.

Normally if you need just to describe your XML file you will use the DTD, for example in editors or programs used to read and generate documents. The Schema it's, on the other side, more adaptable and more powerful. It's written in XML (while the DTD uses its own language), and it'a based primarly on types, rather than on tag names, and it allows to, for example, define datatypes.

Maybe you can use both, considering that, actually, I'm not positive that there is an official reccomendation of the Schemas.

About | Sitemap | Contact