Sam Ruby wrote:

I would prefer to deal with what the spec actually says.  As you point
out, it is "really odd" that nothing was added to the new RFC 3986 to
support your position.

The authors of DOM3 looked at both the xml:base and InfoSet
specifications.  I've taken a look at how two respected XML parsers have
implemented DOM3:

http://www.intertwingly.net/blog/2005/08/12/xml-base-support

- Sam Ruby


Yes, that code is perfectly fine, and not the actual problem.

Let me show you some pseudo-code that implements how to dereference an atom link according to rfc3986:

dereference(linkElement) =
  baseURI = linkElement.baseURI
  linkURI = makeAbsolute(linkElement.href, baseURI)
  if stripFragmentID(linkURI) == stripFragmentID(baseURI)
    then return linkElement.ownerDocument
    else return loadDocument(linkURI)

You'll see the problem when you pass the link element of Tim Brays feed.

Also, Roy T. Fielding says "[...] a person is deliberately abusing the base URI by assigning it an unrelated URI for the purpose of creating an artificial shorthand notation for external references."

There is nothing in rfc3986 that contradicts this, it only indirectly hints to it. The real purpose of a base URI isn't explained in rfc3986.

--
Sjoerd Visscher
http://w3future.com/weblog/

Reply via email to