• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DTD Vs Schema

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I find schemas very much advantageous than DTDs for any kind of scenario...can someone tell when a DTD should be used instead of a schema..I am still not very clear about this.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no hard and fast rule to select a DTD. If you are typing your DTD/ Schema, you would know how painful it is to type a simple schema document. Anyway, schemas are preferred for various advantages but DTDs can still be used if you find it easier to use (like me.)
I think DTDs are strong on entities. I dont think we can use entities/ entitity references/ parameter entities in Schemas.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not looking at DTDs just because they r precise and easy to type...If it is the matter of typing, there are 101 IDEs to do the job for us...
I am looking at advantages of a DTD over a Schema in a real time b2b or a b2c environment.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Entities can be defined in Schemas using the data type <b>entity</b>. U wouldnt need a parameter entity in a scema as u have <b>include</b> and <b>import</b> to import schemas and <b>ref</b> atribute to reuse the element and attribute definitions. These r much more powerful than parameter entities.
 
Karthik Jayaraman
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DTDs can either be internal or external. I think the advantages comes with an internal dtd.
1) Lesser roundtrips to the server:
If the DTD is included in the instance document, the parser need not send a request back to the server to fetch the DTD or schema for validating the instance document. (Not considering public identified DTDs or those that are cached.)
2) Validation can be changed at runtime.
Since the internal DTD subset overrides the external DTD, it can be used for changing the validation rules at runtime in the instance document (This can also be looked at as a disadvantage.)
I am sure this is not convincing, but, I hope these might be some reasons why we may want to have DTDs.
Any suggestions??
 
Is this the real life? Is this just fantasy? Is this a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic