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

Re: Entity resolution vs. URI resolution

  • To: xml-dev@l...
  • Subject: Re: Entity resolution vs. URI resolution
  • From: Norman Walsh <ndw@n...>
  • Date: Wed, 23 Jan 2002 11:03:09 -0500
  • In-reply-to: <3C4DE133.21C45105@s...> (Edwin Goei's message of "Tue, 22Jan 2002 14:01:23 -0800")
  • References: <3C4DE133.21C45105@s...>
  • Sender: Norman Walsh <ndw@mercury>
  • User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)

entity resolution
/ Edwin Goei <edwingo@s...> was heard to say:
| In SAX there is an entity resolver that takes a pair (publicID,
| systemID) as input:
|   InputSource resolveEntity(String publicID, String systemID)
| For other standards (such as W3C XML Schema), there is a need to resolve
| a schema location URI as a single input paramater:
|   InputSource resolveURI(String locationURI)

I think what's significant here is that many XML vocabularies include
the notion of an "include" element: xsl:include, xsl:import,
xsd:include, xsd:import, xi:include, etc. All of these references are
performed with simple URIs (rather than external entities, as we would
have done in the SGML days).

A great many developers are building applications on top of SAX. I'm
of the opinion that the ubiquity of these sorts of URI references (and
the fact that they are in practice performing the job of entity
references) makes them important enough to provide a SAX-level
resolution mechanism.

In other words, I don't think this is a schema application issue or a
stylesheet application issue (although this problem could certainly be
solved in specialized APIs for each of these types of applications).

| One view is that "entity resolution" = "uri resolution" + "publicID
| resolution".  So if only "uri resolution" is desired, pass "null" as the
| publicID.
| Another view is that these are two fundamentally different animals and
| so two different resolvers should be used.

I argued this point at length on the sax-devel list[1][2]. I am
steadfastly of the opinion that entities and "bare URIs" are entirely
different beasts.

An entity is identified by an external identifier[3]. An external
identifier is logically a tuple of (publicId, systemId). A URI
reference is nothing but a URI. I assert that (null, "foo") is not
identical to ("foo").

Forcing URI resolution through the entityResolver() method requires
the association of a null public identifier with objects (URI
references) that do not logically have a public identifier.

I also observe that while every system identifier is a URI (by
definition), it does not follow that every URI is a system identifier.

I maintain that adding a resolveURI(uri, baseURI) method to the SAX
API is "the right thing".

                                        Be seeing you,

[1] http://sourceforge.net/mailarchive/forum.php?thread_id=40245&forum_id=1472
[2] http://sourceforge.net/mailarchive/forum.php?thread_id=414410&forum_id=1472
[3] http://www.w3.org/TR/REC-xml#NT-ExternalID

Norman.Walsh@S...   | Success is relative; it is what we make of the
XML Standards Engineer | mess we have made of things.--T. S. Eliot
XML Technology Center  | 
Sun Microsystems, Inc. | 


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.
First Name
Last Name
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.