RE: [xml] Loading the DTD external subset



Le 04/04/01 21:26:43, David Lofquist a écrit :
The problem is that the SYSTEM declaration when it begins with a '/' is
going to reference the DTD (or any other similar external entity call) as
an absolute path on the machine where the parsing is occurring.  SYSTEM
declarations not beginning with '/', http:, ftp:, etc. are given the same
context as the calling document, i.e.

And this is a bug in libxml.

According to RFC2396, an URI beginning with '/' is an absolute path but a
relative URI, and should be expanded to an absolute URI using the same
scheme and net_path.

RFC2396, section 3:
  absoluteURI   = scheme ":" ( hier_part | opaque_part )
Hence an absolute URI MUST begin with a scheme, such as http, ftp or file.

Later, section 5:
  relativeURI   = ( net_path | abs_path | rel_path ) [ "?" query ]
A path beginning with '/' (an abs_path) is a relative URI.

Tom.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]