[xml] Base URI and symbolic links


In the situation like:

    symbolic_link.xml -> test/doc.xml

when parsing symbolic_link.xml, the library tries (and fails) to load
doc.dtd, using the current directory as a base.

("doc.xml" refers to just plain "doc.dtd")

RFC-2396 says:

5.1.3. Base URI from the Retrieval URI

   If no base URI is embedded and the document is not encapsulated
   within some other entity (e.g., the top level of a composite entity),
   then, if a URI was used to retrieve the base document, that URI shall
   be considered the base 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.

Now, is symbolic link a "redirected request"? If yes, should the base
URI be a test/ instead?

Apologies if I'm misunderstanding the above RFC completely (maybe not
quoting the right section for this example) or missing something else.



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