Re: [xml] where is the format of PUBLIC defined?



On Fri, 2006-02-17 at 15:19 -0800, Rick Jones wrote:
I'm swimming in circles trying to get on board with catalogs, to deal with a 
problem I have with netperf4 (http://www.netperf.org/svn/netperf4/trunk).

[...]

Specifically, to allow the netperf DTD (src/netperf_doc.dtd) to exist in 
different places between the system running netperf and the systems running 
netserver and still be able to validate the XML-encoded messages that netperf 
and netserver exchange.

To that end I am presently of the belief I need to switch from something akin to:

<?xml version="1.0" standalone="no" ?>
<!DOCTYPE netperf SYSTEM "./netperf_docs.dtd" >
<netperf xmlns="http://www.netperf.org/ns/netperf";>

to something that replaces SYSTEM with PUBLIC. 

You don't need to do this.  See below.

 Every example I've seen in my web searches so far 
looks more or less like:

PUBLIC "-//OASIS//DTD DocBook XML//EN"

from which I gather there is some sort of "structure" to the string - with 
sections separated by "//" but I'm utterly unable to find anything (so far) that 
describes that structure - or I've seen it and simply not recognized it :(

There's an ISP spec that defines it, but in fact XML doesn't use it.
A public identifier can be pretty much anything.  The format, for
what it's worth, is basically
reistered? // owner // what description // language
where registered is a + or a - (you should use a - to mean unregistered)
owner is the people you contact (in writing) to obtain a (printed)
copy of the resource;
"what" will be DTD in this case;
description is a short natural language word or phrase (no // in it
though!)
language will be EN

Having said all that, if you use
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE netperf SYSTEM
   "http://www.netperf.org/netperf_docs.dtd/1.0";>

everything will work just fine -- you use an XML catalogue entry
to rewrite that SYSTEM identifier (the URI) to a local file.

The format of the catalog file was defined by SGML OPEN (as
was), now called Oasis.

PUBLIC identifiers are a holdover from SGML and serve no
real useful purpose in XML that is not served instead by
namespaces and URIs.

Finally ,note that XML does require the SYSTEM identifier to be
a URI, not just a file name, although your example of
"./netperf_docs.dtd" worked because it's a syntactically valid
relative URI.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org




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