Forums Register Login

DTD Vs Schema

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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??
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1569 times.
Similar Threads
DTD vs Schema
referencing another xml
what's the correct format for dozer mapping file?
Can I have both DTD and schema delcaration for single XML file?
XML DTD vs Schema
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 20:33:57.