• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between System and Public  RSS feed

Avinash Mulye
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one PLEASE tell me the difference between System and Public in layman's terms.
I do not mind being spoon-fed !!!
Valentin Crettaz
Gold Digger
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the SGML Tutorial

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

And from the Java Web Services Tutorial

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.

[ July 31, 2002: Message edited by: Valentin Crettaz ]
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The SYSTEM is used to specify the location of a DTD. The PUBLIC keyword is used for the same purpose.
You would use SYSTEM when the DTD is to be used between multiple organizations. The PUBLIC keyword is used when the DTD is used internally and when the location of the DTD is internal to the organization. PUBLIc is also used in legacy SGML applications.
They can also be combined together, in this case if the application cannot locate the DTD using the PUBLIC location then the SYSTEM location is used.
Hope this helps ...
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!