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

Re: Entity resolution vs. URI resolution


url vs uri
/ Elliotte Rusty Harold <elharo@m...> was heard to say:
| At 1:58 PM -0500 1/24/02, Norman Walsh wrote:
|
|>| offers exactly the functionality you're looking for:
|>|
|>| public URL(URL context,
|>|             String spec)
|>|      throws MalformedURLException
[...]
| The following methods are particularly interesting:
|
| public URI resolve(URI uri)
| public URI resolve(String uri)
|
| These return the absolute form of the uri argument using the current
| URI object as the context. Isn't this what you want?

Not at all. Given a possibly null public identifier and a system
identifier, the resolveEntity() method is free to perform any sort of
calculation that it wants. In particular, it is free to examine some
other resource (such as an external catalog, local cache, or the phase
of the moon) and return the InputStream for the entity.

With this facility, I can arrange things so that when I parse
documents that contain the system identifier
http://example.com/some.dtd, the actual DTD used is
file:/share/dtds/example.com/some.dtd. This is very convenient when
I don't happen to be on the net.

I want precisely the same facility for URIs that are retrieved in
contexts other than external identifiers. If someone asks for the
schema module http://example.com/module.xsd, or the XInclude
document ftp://example.com/sometext.xml, or the stylesheet module
urn:x-foo:example:stylesheet:module, I want the ability to determine
(with reference to any other resources I choose, though practically an
XML Catalog), what resource to actually return for the URI in
question.

And I don't want to shoehorn this into resolveEntity(null, myURI)
because that makes all URIs appear to be external identifiers, which
they aren't.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@S...   | A philosophical contempt of life is no
XML Standards Engineer | guarantee of courage in the face of
XML Technology Center  | death.--Gustave Vapereau
Sun Microsystems, Inc. | 

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.