Lists Home |
Date Index |
Leigh Dodds scripsit:
> [A]ccording to Section 7.1.2 of the spec if a system identifier can be matched
> in the catalog then that will always be used; an accompanying public
> identifier is only used as a fallback if the system id doesn't match
> (or is unavailable) and the prefer setting is "public".
So far so correct.
> So public ids are
> only useful if the system identifier isn't available.
Not so. A system identifier matches only if there is a system, rewriteSystem,
or delegateSystem entry in the catalog. So if there are none of these,
then as long as prefer="public" is set (which it should always be), then
public, rewritePublic, and delegatePublic rules are applied.
The setting prefer="system" is really only useful for SGML backward
compatibility. Historically, the SGML system id was generally a local one,
whereas the public id was meant to be universal. XML has made the system id
universal instead; nevertheless, XML Catalogs were meant to be semantically
identical to TR9401 catalogs.
> Given that you
> have to provide both in XML, public ids seem pretty redundant.
There are two cases in which a public id can exist without a system id:
in a NOTATION declaration, and after delegating to a new catalog via
delegatePublic (in which case the original system id is discarded).
> Toying with the command-line resolver application shows behaviour consistent
> with this reading.
> Everything I've read up to now set me up to expect the following: that
> Public Ids would be preferred and that System Ids would be the fallback.
> What am I missing?
> . http://xml.apache.org/commons/
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
John Cowan email@example.com www.ccil.org/~cowan www.reutershealth.com
"If I have seen farther than others, it is because I was standing on
the shoulders of giants."