Posted on May 18, 2007 by sharat
A document type definition (DTD) describes the permissible tags of an XML document.
The DTD serves as a data template. It defines entities, elements, attributes, and notations, as well as the relationships between these.
For example, the DTD can state that a memo element consists of To, From, Subject, and Message elements.
You need to use a DTD [...]
Filed under: XML | 1 Comment »
Posted on May 18, 2007 by sharat
Schemas are becoming more popular and DTDs less so. A schema is an XML-based syntax for describing how the XML document is marked up or how it looks – very similar to a DTD, but a DTD has a lot of drawbacks.A DTD doesn’t use anything like XML syntax to describe the definition. You can’t [...]
Filed under: XML | Leave a Comment »
Posted on May 18, 2007 by sharat
An XML namespace is a collection of element names or attribute names to be defined within an XML document.Let’s say you have an invoice XML document and an order XML document and you want to put them together. You usually have certain names that overlap each other – like the date. You might have an [...]
Filed under: XML | Leave a Comment »
Posted on May 18, 2007 by sharat
XML is free form which means that you can configure it any way you want. It’s also very easy to read – you don’t have to read cryptic code to figure it out.It was designed specifically for internet protocols, and this makes it simple to transmit an XML document across, for example, a HTTP protocol.Strong [...]
Filed under: XML | 1 Comment »
Posted on May 18, 2007 by sharat
XML Schema
DTD
Markup validation
Any global element can be root. No ambiguous content support.
Can specify only the root element in the instance document. No ambiguous content support.
Namespace support
Yes. Declarations only where multiple namespaces are used.
No.
Code reuse
Can reuse definitions using named types.
Poorly supported. Can use parameter entities.
Datatype [...]
Filed under: XML | 7 Comments »
Posted on May 18, 2007 by sharat
They are not written in XML syntax, which means you have to learn a new syntax in order to write them
there is no support for namespaces
there are no constraints imposed on the kind of character data allowed, so datatyping is not possible
there is minimal support for code modularity and none for inheritance
large DTDs are hard [...]
Filed under: XML | Leave a Comment »