I do not mind being spoon-fed !!!
Avinash.
Document type declaration
The document type declaration tells you and the parser which DTD (document type definition) governs the current document. Usually the DTD is incorporated by reference to a PUBLIC or SYSTEM name by which the parser or SGML application can find the DTD.
The declaration portion of an SGML document will also declare document-specific components:
- Entities used in the document (also addressable as PUBLIC or SYSTEM entities);
- Any notation types not declared in the main DTD
...
Keywords PUBLIC and SYSTEM
PUBLIC entities are those entities assumed to be known to many systems so that a full declaration need not be transmitted. This format is generally used to declare publicly available DTDs, standard character sets, and commonly used notations such as TIFF.
A formal public identifier must also include:
- the "owner" (usually the originator) of the entity, such as the ISO, Department of Defense, or a publishing house.
- the public text class, such as ENTITY, DTD, SUBDOC, TEXT, or NOTATION.
- public language code, such as EN for English.
SYSTEM entities are not assumed to be known to a receiving system. Thus, such entities require a full declaration of system identification (path, etc.) when they are exchanged
The DOCTYPE tag occurs after the XML declaration and before the root element.
The SYSTEM identifier specifies the location of the DTD file. Since it does not
start with a prefix like http:/or file:/, the path is relative to the location of
the XML document. The parser is using that information to find the DTD file, just as your application would to
find a file relative to the XML document.