[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML Catalogs and Public Ids


xml public system id
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?
> 
> [1].
> https://www.oasis-open.org/committees/entity/specs/cs-entity-xml-catalogs-1.0.html
> [2]. http://xml.apache.org/commons/
> [3].
> https://www.oasis-open.org/committees/entity/specs/cs-entity-xml-catalogs-1.0.html#s.ext.resx
> 
> 
> -----------------------------------------------------------------
> 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  jcowan@r...  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."
        --Isaac Newton

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.