W3C home > Mailing lists > Public > public-lod@w3.org > January 2011

Re: URI Comparisons: RFC 2616 vs. RDF

From: Dave Reynolds <dave.e.reynolds@gmail.com>
Date: Mon, 17 Jan 2011 16:37:00 +0000
To: Martin Hepp <martin.hepp@ebusiness-unibw.org>
Cc: public-lod@w3.org
Message-ID: <1295282220.2974.165.camel@dave-desktop>
On Mon, 2011-01-17 at 16:51 +0100, Martin Hepp wrote: 
> Dear all:
> 
> RFC 2616 [1, section 3.2.3] says that
> 
> "When comparing two URIs to decide if they match or not, a client   
> SHOULD use a case-sensitive octet-by-octet comparison of the entire
>     URIs, with these exceptions:
> 
>        - A port that is empty or not given is equivalent to the default
>          port for that URI-reference;
>        - Comparisons of host names MUST be case-insensitive;
>        - Comparisons of scheme names MUST be case-insensitive;
>        - An empty abs_path is equivalent to an abs_path of "/".
> 
>     Characters other than those in the "reserved" and "unsafe" sets (see
>     RFC 2396 [42]) are equivalent to their ""%" HEX HEX" encoding.
> 
>     For example, the following three URIs are equivalent:
> 
>        http://abc.com:80/~smith/home.html
>        http://ABC.com/%7Esmith/home.html
>        http://ABC.com:/%7esmith/home.html
> "
> 
> Does this also hold for identifying RDF resources
> 
> a) in theory and

No. RDF Concepts defines equality of RDF URI References [1] as simply
character-by-character equality of the %-encoded UTF-8 Unicode strings.

Note the final Note in that section:

"""
Note: Because of the risk of confusion between RDF URI references that
would be equivalent if derefenced, the use of %-escaped characters in
RDF URI references is strongly discouraged. 
"""

which explicitly calls out the difference between URI equivalence
(dereference to the same resource) and RDF URI Reference equality.

BTW the more up to date RFC for looking at equivalence (as opposed to
equality) issues is probably the IRI spec [2] which defines a comparison
ladder for testing equivalence.

Dave

[1]
http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref

[2] http://www.ietf.org/rfc/rfc3987.txt
Received on Monday, 17 January 2011 16:38:19 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 31 March 2013 14:24:31 UTC