Re: [xml] DOM Base URI (xml:base, RFC 2396)

Daniel O'Connor wrote:
The base URI of an element is:

   1. the base URI specified by an xml:base attribute on the element,
if one exists, otherwise
   2. the base URI of the element's parent element within the document
or external entity, if one exists, otherwise
   3. the base URI of the document entity or external entity
containing the element.
$doc = new DOMDocument();

var_dump($doc->baseURI); //

What have I missed apart from libxml & xerces (and probably others)
don't seem to do this at the moment?
document nodes are not element nodes.
So what you are saying is that currently no parser can be used for these

Well, there's a couple of different GRDDL implementations out there
which do pass
Those appear to be implementations built upon existing parsers. One even happens to be using libxml2. I still say that the xml:base clarifications in the GRDDL specs are specific to GRDDL. The current behavior of the existing XML parsers are correct in respects to how they handle base uri. When writing an implementation for GRDDL, you would need to use the base uri of the document element rather than from the document node in order to conform to the GRDDL specification in terms of the document's base uri.


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