Re: issue with relative URIs in the DOM

At 11:45 2000 07 14 -0500, Curt Arnold wrote:
>Philosophically, I think the scoping statement betrays the objective of XML
>Base.  XML Base's motivation was to separate resolution of relative URI's
>from the physical location of the resource.  But the scoping rule, makes the
>physical structure of the XML document an issue in interpretation.

Others have argued similarly--you are certainly not alone, and
your position is not unreasonable.

However, I would argue that it is not the case that "XML Base's 
motivation was to separate resolution of relative URI's from the 
physical location of the resource."  Rather, I like to think of 
XML Base as merely providing for XML resources what RFC 2396 [1] 
calls the "Base URI within Document Content" (see Section 5.1.1).  
As 2396 says in that section:

  It is beyond the scope of this document to specify how, for each
  media type, the base URI can be embedded.  It is assumed that user
  agents manipulating such media types will be able to obtain the
  appropriate syntax from that media type's specification.  

XML Base is precisely the definition of how to embed the base URI
in a resource of type XML, and that's all.  

The rest of section 5.1 of 2396 is all about the various levels of 
"Establishing a Base URI", and the level described in section 5.1.3 
is "Base URI from the Retrieval URI" which, as the XML Core WG and 
most existing implementations interpret it, implies precisely the 
scoping of base URI to the current entity.

Furthermore, the XML 1.0 spec says:

  Unless otherwise provided by information outside the scope of
  this specification (e.g. a special XML element type defined by
  a particular DTD, or a processing instruction defined by a
  particular application specification), relative URIs are relative
  to the location of the resource within which the entity declaration
  occurs. A URI might thus be relative to the document entity, to the
  entity containing the external DTD subset, or to some other external
  parameter entity. [2]

So it's not XML Base that has defined the scoping, it's RFC 2396 and XML.

paul

[1] ftp://ftp.ietf.org/rfc/rfc2396.txt
[2] http://www.w3.org/TR/REC-xml#sec-external-ent

Received on Friday, 14 July 2000 13:28:08 UTC