Hi all, I read that a document type declaration can point to an external subset containing markup declarations, or can contain the markup declarations directly in an internal subset, or can do both. Why would you need both an internal subset and external subset..is it not equivalent to declaring the markup elements twice? Thanks, Deepti.
Any declarations in the internal DTD take precedence over similar declarations in the external DTD. For example, you might have a standard DTD which is publicly available and used by all organizations belonging to a particular business domain. It makes sense to use any standard DTD, which is in use for a particular kind of a business rather than invent your own. In such a situation you would want to use an external DTD. However not everything in the external DTD might suit your requirements, in which case, you can override any declarations selectively in the internal DTD. Also another situation, where you might want to use both an internal and external DTD is if you have two (or more) XML documents, which share a set of declarations, then it is better to put the common set of declarations in an external DTD and put the specific declarations in the individual XML document. That way if the declaration needs to be modified, then it needs to be done in only one place. Hope this helps . . . Shashank SCJP2,SCJD2 IBM Certified Developer - XML and Related Technologies
<b><br /><a href="http://mailto:email@example.com" target="_blank" rel="nofollow">Shashank Tanksali</a><br /><i><br />SCJP2,SCJD2,SCWCD<br />IBM Certified Developer - XML and Related Technologies<br />PMI Certified Project Management Professional<br /></i><br /></b>
posted 18 years ago
Thanks Shashank! So we are overriding declarations in the external DTD by declaring them again in the internal DTD. Deepti
Skool. Stay in. Smartness. Tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book