Wednesday 29 May 2013

Differences between DTDs and Schema

Tags

What are differences between DTDs and Schema?


SchemaDTD
Schema document is an XML document i.e., the structure of an XML document is specified by another XML document.DTDs follow SGML syntax.
Schema supports variety of dataTypes similar to programming language.In DTD everything is treated as text.
In Schema,  It is possible to inherit and create relationship among elements.This is not possible in DTD without invalidating existing documents.
In Schema, It is possible to group elements and attributes so that they can be treated as single logical unit.Grouping of elements and attributes is not possible in DTD.
In Schemas, it is possible to specify an upper limit for the number of occurrences of an elementIt is not possible to specify an upper limit of an element in DTDs


EmoticonEmoticon