From: Michael Kay <mike@sa...> - 2005-11-12 21:16:47
To confirm and add to what has already been said on this thread:
(a) Saxon is doing what the JDK 5.0 java.net.URI class does
(b) java.net.URI is doing what RFC 2396 says
(c) this is conformant with the W3C spec for resolve-uri(): see
(d) RFC 3986 changes the behavior from RFC 2396
(e) The W3C spec also permits use of the RFC 3986 algorithm
(f) It appears that JDK 6 will replace the RFC 2396 algorithm with the RFC
3986 algorithm. So all that you need to do to get the desired behaviour is
to upgrade to JDK 6 when it becomes available.
In the light of this, I propose to do nothing. If it's really important to
you to use the RFC 3986 algorithm now, you can always implement an extension
function to do it.
> -----Original Message-----
> From: saxon-help-admin@...
> [mailto:saxon-help-admin@...] On Behalf Of
> Rademacher, Gunther
> Sent: 08 November 2005 23:22
> To: saxon-help@...
> Subject: [saxon] fn:resolve-uri() question
> While using fn:resolve-uri for resolving HTML links, I found
> resolve-uri("?y", "http://test.com/a/b?x";)
> results in
> i.e. the final path segment is lost, when the relative URI
> consists of just the query component. The expected result for
> an HTML link however is
> which is what the browsers do.
> The XQuery CR refers to RFC2396 and RFC3986, and at least the
> algorithm of the latter in my understanding keeps the full
> path component. Should not resolve-uri keep it as well?
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App
> Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> saxon-help mailing list
> In the light of this, I propose to do nothing. If it's really=20
> important to you to use the RFC 3986 algorithm now, you can=20
> always implement an extension function to do it.=20
I have no objection, in fact I have solved my problem by wrapping
fn:resolve-uri into an XQuery function correcting the symptom.
Thanks for looking into this problem.