Feature Post


How to make an external non editable DTD

While preparing xml schema document(xsd) and their document type definitions(dtd), I encountered a situation where I wanted:

- The XML files to be editable
- And DTD files to be readonly

Obviously this means, avoid using the internal dtd and even external editable dtd.

So, after several googles/xml documentations/msdn searches, I thought of putting my dtd document on a public domain; So I am posting this for if I need this in future.

One way of achieving this, is to post the dtd document on a domain with system keyword.
< !DOCTYPE rootElementName SYSTEM "http://MyDomain.pk/MyDefinitions.dtd" >

or if you must use PUBLIC keyword then adding the optional string that would describe the data structure that dtd defines.
< !DOCTYPE rootElementName PUBLIC "-//Any_Name_for_the_dtd//" "http://MyDomain.pk/MyDefinitions.dtd" >

  • Click here for a very nice resource.
  • When authoring your web documents here is the list of w3c recommended dtds.
  • And if you do not have any idea about DTD, and go here.