SV: SV: [jdom-interest] One less TODO item
Elliotte Rusty Harold
elharo at metalab.unc.edu
Tue Oct 7 11:04:55 PDT 2003
At 7:15 PM +0200 10/7/03, Per Norrman wrote:
>I looked again at the RFC 2396, and I'm now leaning on that the correct
>resolution of DTD/xyz to the base URI http://www.cafeconleche.org
>is indeed http://www.cafeconleche.orgDTD/xyz. Obviously, this is not
>the desired result, but there is a concise algorithm in the spec
>that yields this result!. Perhaps this quote from section 5.1.4 of said
>document encapsulates the problem:
>
It's not just RFC 2396 that's involved here. It's HTTP. Without
appending the / you can;t even make the request to the web server.
That is, HTTP does not allow you to say:
GET HTTP/1.0
You have to say
GET / HTTP/1.0
The problem is that the HTTP client makes this change, so the
document returned does indeed have the proper base URI of
http://www.cafeconleche.org/. The problem is when the parser does not
use the actual base URI of the document to resolve the relative URIs
in that document. Instead it uses the original request URI. The HTTP
client part of the code changed this URI, but the XML parser's view
of the URI did not change in sync.
--
Elliotte Rusty Harold
elharo at metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA
More information about the jdom-interest
mailing list