This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Succeeding with AI and have Veljko Krunic on-line!
See this thread for details.
Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Difference between System and Public

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 !!!
Author & Gold Digger
Posts: 7617
IntelliJ IDE Java
  • 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 ...
    Bookmark Topic Watch Topic
  • New Topic