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

System identifiers and base URIs

  • From: Norman Walsh <ndw@n...>
  • To: xml-dev@x...
  • Date: Fri, 04 Aug 2000 07:39:15 -0700

dtd base uri
It's possible that the following question is concretely answered
somewhere, in which case a simple whack on the head would be
appreciated. :-)

Suppose I attempt to parse a document: http://foo.bar/baz.dtd and that
attempt results in a redirect to http://moo.goo/boo.dtd. RFC2396 makes it
clear that the resulting base URI is http://moo.goo/boo.dtd:

  5.1.3. Base URI from the Retrieval URI

     [...] Note that if the retrieval was the
     result of a redirected request, the last URI used (i.e., that which
     resulted in the actual retrieval of the document) is the base URI.

What isn't well defined, AFAICT, is what "redirected request" really
means.  Suppose that my parser has an SAX entityResolver installed and
the entity resolver (through means that I don't think are important to
this question) decides to perform the redirection. What is the base
URI of the resulting document?

To make things concrete, suppose I have a document with a DOCTYPE
declaration that references http://foo.bar/baz.dtd (and I'm doing a
validating parse). The parser attempts to open http://foo.bar/baz.dtd,
and the entity resolver opens and returns http://moo.goo/boo.dtd
instead.

Subsequently, the parser encounters a relative URI "somefile.ent" in
the DTD. It must calculate an absolute URI in order to open it.

Is the resulting absolute URI "http://foo.bar/somefile.ent" or
"http://moo.goo/somefile.ent"? Or is there not a definitive answer?

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@E... | Are you not the future of all the memories
XML Technology Center     | stored within you? The future of the
Sun Microsystems, Inc.    | past?--Val\'ery

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.