Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

DTD versus XSD

MomosMomos Posts: 9Member
Will DTD's disappear in the future? I have often heard about XSD's being the DTD's of the future, but when you have to write an XSD for HTML for instance, it wil be more than twice as big as the DTD for the same purpose. It's true that the DTD will be less defined, but is that really necessary for such definition?

Comments

  • nagvivnagviv Posts: 5Member
    : Will DTD's disappear in the future? I have often heard about XSD's being the DTD's of the future, but when you have to write an XSD for HTML for instance, it wil be more than twice as big as the DTD for the same purpose. It's true that the DTD will be less defined, but is that really necessary for such definition?
    :
    Hi,

    Well for one DTDs are not really a part of XML. They jsut do not follow XML scheme of representing things, in other words DTDs do not follow XML syntax. Secondly there are many things that DTDs can just never let you specify as a document definition. For example:
    1) You cannot derive an element from another. For ex, you cannot say address can be derived as a combination of Street Address, City, and State.
    2) DTDs do not support data types. Well this is self descrptory. A fall-out of this is that you cannot set ranges etc, which is normally associated with data types.

    So as you can see XSDs are not an overhead but are real necessities for proper XML document definition.

    Regards,

    G. Nagraj
Sign In or Register to comment.