# Re: FW: Questions about RFC 2396

From: Dan Connolly <connolly@w3.org>
Date: Mon, 24 Feb 2003 09:12:20 -0600
To: Graham Klyne <GK@NineByNine.org>
Cc: Stefan Eissing <stefan.eissing@greenbytes.de>, uri@w3.org
Message-id: <1046099540.11203.402.camel@dirk.dm93.org>

On Mon, 2003-02-24 at 08:54, Dan Connolly wrote:
> On Thu, 2003-02-20 at 11:16, Graham Klyne wrote:
> > Interesting case...
> >
> > Dan, maybe add something based on this to your test cases [1]?
> >
> >        ('http://ex/x/y', 'http://ex/x/q:r', 'q:r'),
>
> No, that would violate the axiom
> 	x + (y-x) = y
> i.e.
> 	join(x, refTo(x, y)) == y
>
> since join(x, z) = z when x and z are absolute
> and don't share a scheme, which is the case for
> 	join('http://ex/x/y', 'q:r')
>
> It's quite necessary to escape the ':' for this reason.
>
> I don't manage negative tests.

I take that back... the tests embedded in the docs
can accomodate this sort of thing; I added:

[[[
Note the relationship between refTo and join:
join(x, refTo(x, y)) == y
which points out certain strings which cannot be URIs. e.g.
>>> x='http://ex/x/y';y='http://ex/x/q:r';join(x, refTo(x, y)) == y
0

So 'http://ex/x/q:r' is not a URI. Use 'http://ex/x/q%3ar' instead:
>>> x='http://ex/x/y';y='http://ex/x/q%3ar';join(x, refTo(x, y)) ==
y
1
]]]

> > [1] http://www.w3.org/2000/10/swap/uripath.py
v 1.10 2003/02/24 15:06:38

--
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Monday, 24 February 2003 10:21:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:05 UTC