• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DTDs Vs Schemas

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any article on the web on the topic DTDs Vs Schemas..i.e when to use what in real life applications? Please guide
 
Joel Amoussou
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Daisy,
The superiority of XML Schema resides in the following:
1. It supports basic datatypes used in most programming languages and SQL.
2. It gives you the ability to create your own types (you can create a type for canadian postal codes)
3. It has built-in support for namespaces (namespaces do not apply to DTDs, although you can define a namespace in a DTD)
4. You can create open content models in an XML Schema by allowing elements from another namespace, not specified in the Schema, to appear in an instance (wildcards <xsd:any> and <xsd:anyAttribute> . Content models in a DTD are closed
5. Object-oriented features particularly inheritance.
6. XML Schema documents are well formed XML documents.
Based on my experience, DTDs are OK for text intensive application like document management and single sourcing with XML.
But when it comes to EDI type of applications XML Schema is the choice. WSDL also uses XML Schema as its preferred type system.

Joel Amoussou
IBM XML Certification Practice Test
http://www.xmlmentor.net/xmlexamsim.htm
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u for the info. But my question doesnt end here
Obviously Schemas have an edge over DTDs. But when should one have to go for a DTD than a schema. Are there any performance related issues that needs to be considered when choosing anong DTD/Schema.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic