Print

Print


Hi All,
I am a novice to XML and just started with it. The one question which always come to me is :
Why do we need the well formed documents when a DTD associated with the document can provide us better insight about the content of
the document. I suppose that just to reduce the network traffic. But can't we do it as follows :
1) Every document is associated with its DTD
2) The client has in its repository all the commonly used DTDs in the parsed form.
3) Client wants to access a document on the web which has some DTD associated with it.
4) Client browser sees that the associated DTD is lying locally in the parsed format. It just downloads the document instance and
opens it if it found to be confirming with its DTD.
5) If client access any such document whose DTD is not available locally, then it will also download the DTD, parse it and store it
into its repository for using it later when accessing similar document types.

Won't this proposal be much better then using documents with no DTDs attached with them. Correct me if i have made some wrong
statement. Actually i have some SGML background and can't think of documents with no associated DTDs.
This proposal does not include the cases when XML is used as metadata. In that case the well-formedness can serve.

Any responses will be appreciated.

Thanks
Anant Verma
Software Engineer,
HCL Technologies India Ltd.,
#3, Phase 1,
Udyog Vihar,
Gurgaon - 122016
India
Ph  : +91 124 342971, 342370, 345960
Fax : +91 124 345959, 340113
E-mail : [log in to unmask]