What are differences between DTDs and Schema?
Schema | DTD |
---|---|
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 element | It is not possible to specify an upper limit of an element in DTDs |
EmoticonEmoticon