If that is true then why have a PUBLIC identifier at all ? What is
their purpose
beware that you are skirting on the edge of a very deep "debate"
Basically the public identifier gives a unique canonical name for the
dtd that you can recognise; whereas the SYSTEM identifier may well point
at a local path on the original author's system that doesn't make sense
on yours. An XML parser may use either (or both) identifiers to find the
file.
So if you have an xml parser that has an xml catalogue of some sort that
recognises say XHTML or Docbokk PUBLIC identifier, the file will work
even if the system ID points at a file not accessable to you as your
parser can use the catalogue to map the public ID to a local
copy. Conversely if you don't have that public id in your catalogue (or
if there is no public id) then you can perhaps find the file directly by
using the system id.
When the syntax was invented, for sgml, this last step would most
likely fail as it would be a local file name so it would assume that you
had local files in the same position. In XML when the SYSTEM is supposed
to be a URI and so perhaps usable from anywhere in the world there is an
argument (that I don't personally hold, but which is not unreasonable,
and comes up often) that the SYSTEM ID is all you need and PUBLIC IDs no
longer serve a purpose.
David