XML base and same document references



I'm trying to find out how to deal with same document references in XML base, and particularly with empty URIs. The specification says:



RFC 3986 defines certain relative URI references, in particular the empty string and those of the form #fragment, as same-document references. Dereferencing of same-document references is handled specially. However, their use as the value of an xml:base attribute does not involve dereferencing, and XML Base processors should resolve them in the usual way. In particular, xml:base="" does not reset the base URI to that of the containing document.



Now, I would assume that an empty URI should be referenced in the "usual way". But what would that be? Can't be the RFC's way, as it's clearly excluded. I might think that the XML base specification gives a hint in the previous paragraph:



The base URI for a URI reference appearing in an xml:base attribute is the base URI of the parent element of the element bearing the xml:base attribute, if one exists within the document entity or external entity, otherwise the base URI of the document entity or external entity containing the element.



Does that mean that an element with an empty xml:base URI gets the same base URI as its parent, or the URI of the containing document? And what happens if xml:base is just a fragment, and not completely empty?


EDIT: XML base spec is available here:


http://ift.tt/1tZdVSp


No comments:

Post a Comment