This is the mail archive of the
mailing list for the DocBook project.
RE: [docbook] URN for Simplified DocBook and DocBook XML
- From: Peter Ring <pri at magnus dot dk>
- To: docbook at lists dot oasis-open dot org
- Date: Wed, 7 May 2003 09:51:27 +0200
- Subject: RE: [docbook] URN for Simplified DocBook and DocBook XML
>From the XML Catalog spec :
"If the system identifier is a URN in the publicid namespace, it is
converted into a public identifier by "unwrapping" the URN. In this case,
one of the following must apply:
1. No public identifier was provided. Resolution continues as if the public
identifier constructed by unwrapping the URN was supplied as the original
public identifier and no system identifier was provided.
2. The normalized public identifier provided is lexically identical to the
public identifier constructed by unwrapping the URN. Resolution continues as
if the system identifier had not been supplied.
3. The normalized public identifier provided is different from the public
identifier constructed by unwrapping the URN. This is an error. Applications
may recover from this error by discarding the system identifier and
proceeding with the original public identifier."
So the following DOCTYPE declaration should amount to not specifying a
<!DOCTYPE article PUBLIC
"-//OASIS//DTD DocBook XML V4.1.2//EN"
BTW, early drafts of the XML Catalog spec suggested that XML Catalog
resolvers should be expected to look after a default catalog, located as a
relative URI to the document being processed . This was removed because,
as Daniel Veillard states it , "... having to make an URI reference
lookup based on the resource one want to fetch to guess if there is a
catalog associated is not scalable, not secure and not something I ever want
to implement. At least I can trust /etc/xml/catalog and load it once for the
full lifetime of my application."
My conclusion: If you must rely on resolving entities via canonical URLs
over the internet, you are in for all kinds of trouble. Better take the
trouble to set up local entity resolution.
<@ @> Peter Ring
| Address Palægade 4
| P.O.Box 9026
| DK-1022 København K
| Phone +45 3396 0153
| Fax +45 3396 0101
| EMail email@example.com
| WWW www.magnus.dk
From: Oliver Fischer [mailto:firstname.lastname@example.org]
Sent: 6. maj 2003 21:26
To: Jirka Kosek
Cc: Peter Ring; email@example.com
Subject: Re: [docbook] URN for Simplified DocBook and DocBook XML
Jirka Kosek wrote:
> Using URN is a very good practise in many places (e.g. namespace
> identifiers) but not in system identifiers. System identifier must be
> always resolvable, and this can't be guaranteed with URN.
According to the standard is a URN also a valid URI - IMHO. Or did I
misinterpret the docs I read? A SystemLiteral is URI and both URL
and URN are URIs. So why not use a URN als SystemLiteral?
I could use catalog files to resolve the URN. Or not?
--[ Oliver Fischer ]-[ firstname.lastname@example.org ]---------------------------
Technologie des letzten Jahrtausends? Das Internet!
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org