OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML Public Indentifier



On Wed, 5 Sep 2001, Harden ZHU wrote:

> Hi
>
> 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?
>

Harden:

	The public identifier is an ISO standard and has a sytax all it's
own:

     "-//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
resources:

PUBLIC "-//ECC, Inc//DTD myDTD version 1//EN"
   "http://www.eccnet.com/myDTD/myDTD.dtd"
PUBLIC "-//ECC,Inc//NONSGML First Graphic//EN"
   "http://www.eccnet.com/graphics/myDTDgraphic1.gif"

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

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Betty Harvey, XML Consultant         | Phone: 410-787-9200 FAX: 9830
Electronic Commerce Connection, Inc. |
harvey@eccnet.com                    | Washington,DC SGML/XML Users Grp
URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug/
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/