[Bug 8810] [FO 1.1] resolve-uri() and the various RFCs

http://www.w3.org/Bugs/Public/show_bug.cgi?id=8810





--- Comment #2 from Michael Kay <mike@saxonica.com>  2010-03-02 16:00:08 ---
First point: there's a contradiction here. In XSLT and XQuery, when we have to
resolve a URI, we generally handle "wannabe URIs" according to the rules in
XLink: that is, the URI is first percent-encoded to make it a valid RFC 3986
URI, then the URI resolution algorithm in the RFC is applied. The current spec
for resolve-uri() does not do this (it rejects wannabe-URIs with an error). I
propose that resolve-uri() should be changed to apply the escaping where
needed.

Then the change to resolve-uri() is proposed as follows:

(0) Add phrasing to the effect: "The URI references must conform to the same
rules as the locator attribute (href) defined in section 5.4 of [XLink]; if
necessary to make them valid according to RFC 3986, they are first
percent-encoded." (Need to check the new XLink draft here).

(1) change "If $relative is a relative URI reference, it is resolved against
$base, or against the base-uri property from the static context, using an
algorithm such as those described in [RFC 2396] or [RFC 3986], and the
resulting absolute URI reference is returned." to

"If $relative is a relative URI reference, it is resolved against $base, or
against the base-uri property from the static context, using the algorithm 
described in [RFC 3986], and the resulting absolute URI reference is returned."

(2) change the second note "The algorithms in the cited RFCs..." accordingly.

Second, several specs (XQuery, XSLT, F+O) make frequent reference to
"resolving" a URI. These references can easily be found by searching (but take
care, because the word is also used in other senses, e.g. resolving a namespace
prefix). I propose that each of these specs contains the definition:

[DEFINITION: to *resolve* a relative URI is to expand it to an absolute URI, by
reference to a base URI, as if by calling the function fn:resolve-uri.]

and that appropriate uses of the term resolve should be linked to this
definition. The definition can go in 2.4.5 URI Literals for XQuery, in 6
Functions that manipulate URIs for F+O, and in 5.8 URI References for XSLT.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 2 March 2010 16:00:13 UTC