[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML Public Indentifier
- From: "Betty L. Harvey" <email@example.com>
- To: Harden ZHU <firstname.lastname@example.org>
- Date: Wed, 05 Sep 2001 08:45:52 -0400 (EDT)
On Wed, 5 Sep 2001, Harden ZHU wrote:
> I have some XML docs as
> <!DOCTYPE Catalog PUBLIC "-//PubCatalog" "http://www.xyz.com/catalog.dtd">
> I don't know how public indentifier works. Is "-//PubCatalog" a URI? And How parser find it and work with it?
The public identifier is an ISO standard and has a sytax all it's
"-//ECC, Inc//DTD myDTD version 1//EN"
- = locally defined public identifier. If there is a + before
the first two // it means it has been registered at ISO.
ECC, Inc = The organization or entity.
DTD = Keyword that says this public identifier is for
a DTD. There are other Keywords, ENTITIES, NOTATION, etc.
myDTD version 1 = Description
EN = Language code. In this case the language is English.
Software that uses public identifiers use a 'catalog' as a
mechanism for finding the resource. For example, if I have graphics
included in my XML document:
<!DOCTYPE myDTD PUBLIC "-//ECC, Inc//DTD myDTD version 1//EN" [
<!ENTITY graphic1 PUBLIC "-//ECC,Inc//NONSGML First Graphic//EN"
The external catalog file is used to find the location of the
PUBLIC "-//ECC, Inc//DTD myDTD version 1//EN"
PUBLIC "-//ECC,Inc//NONSGML First Graphic//EN"
This is where I think XML drops the ball. With a catalog file
I can move my XML files anywhere I want and just change the
reference in the catalog file.
With XML, you have to explicitly include this information in
your document. Therefore, if you move files around, then your
links are broken.
IMHO namespaces fall way below the mark. To be fair to
namespaces, the public identifier (PI) is seen by the parser as
only 'text' also but the resolves to a resource whereas the
namespace doesn't necessarily depending upon your interpretation
of individual specification. Namespaces are too nebulous.
Hope this helps.
Betty Harvey, XML Consultant | Phone: 410-787-9200 FAX: 9830
Electronic Commerce Connection, Inc. |
email@example.com | Washington,DC SGML/XML Users Grp
URL: http://www.eccnet.com | http://www.eccnet.com/xmlug/