W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2003

Re: TR/xquery-operators/#func-doc

From: <ktl@ktlim.com>
Date: Wed, 14 May 2003 16:41:37 -0700
To: "Kay, Michael" <Michael.Kay@softwareag.com>
Cc: public-qt-comments@w3.org
Message-ID: <20030514164137.B4054@ktlim.com>

Michael,

> I don't share your reading of this (notoriously difficult) RFC.

	I agree that the RFC is notorious for its inexact language
and can be difficult to understand.

> The paragraph you are quoting occurs within a section that is describing how
> to resolve a relative URI against a base URI. It states explicitly that you
> can't resolve a relative URI without knowing the base URI, and section 5.1
> explains clearly the precedence of the rules for establishing a base URI,
> which are reflected in the XML specifications for xml:base.

	No disagreement here.

> I think that the paragraph you quote is using the term "current document"
> loosely (there is no formal definition of this term and it is not used
> anywhere else)

	Actually, "current document" is also used in section 4.2, which
I just noticed is much more explicit about what the zero-length string
means as a URI:

   A URI reference that does not contain a URI is a reference to the
   current document.  In other words, an empty URI reference within a
   document is interpreted as a reference to the start of that document,
   [...]
   However, if the URI reference occurs in a context that is always
   intended to result in a new request, as in the case of HTML's FORM
   element, then an empty URI reference represents the base URI of the
   current document and should be replaced by that URI when transformed
   into a request.

Since fn:resolve-uri explicitly disclaims in the Note that any
new request will occur, the second part of this does not seem
to apply.  Accordingly, as long as the XPath or argument to
fn:resolve-uri() (or fn:doc() or document()) appears within a
document, the zero-length string should be a reference to the
start of that document.

> ["current document" should] mean "the resource identified by
> the base URI"

	In light of the above-referenced section, it is hard
to see how to justify this from the RFC's language.  If this
were the intent, there would be no need for the "However".

-- 
Kian-Tat Lim, ktl@ktlim.com, UTF-7: +Z5de+pBU-
Received on Wednesday, 14 May 2003 19:39:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT