• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Carey Brown
  • Frits Walraven

Internal and external subsets

Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 . . .
IBM Certified Developer - XML and Related Technologies
Deepti Chalichama
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Shashank!
So we are overriding declarations in the external DTD by declaring them again in the internal DTD.
Skool. Stay in. Smartness. Tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
    Bookmark Topic Watch Topic
  • New Topic