W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 2001

RE: Non-canonical URIs in RDF

From: Mark Birbeck <Mark.Birbeck@ePolitix.com>
Date: Tue, 4 Dec 2001 10:32:35 -0000
Message-ID: <6403181231ADB9438FE28C10F35C5B840CE2E4@S007.x-port.net>
To: "'Jeremy Carroll'" <jjc@hplb.hpl.hp.com>, www-rdf-interest@w3.org
Jeremy Carroll wrote:

> [A] (consistent correction)
> <http://example.org/#test1> <rdf:value> <http://example.org/test2> .
> <http://example.org/> <rdf:value> <http://example.org/#test1> .
>
> [B] (minimalist correction)
> <http://example.org/#test1> <rdf:value> <http://example.orgtest2> .
> <http://example.org> <rdf:value> <http://example.org/#test1> .
>
> [C] (not my job)
> error

I think all three are wrong!

I don't understand the notion of 'correction' here. As far as I can see the
URI you use in xml:base is valid as a URI (the path part is optional, after
all, and the trailing slash is part of the path, not part of the authority).
The only thing I can see that needs correcting is the algorithm in RFC2396
for creating an absolute path from a relative path. (5.2.6.a should have
something like - if the base URI has no path, then the buffer is set to
"/".) Following the steps in 5.2.6, as you rightly say gives us:

    http://example.orgtest2

rather than:

    http://example.org/test2

but that is not due to an incorrectly specified base URL, but an incorrect
algorithm.

So, I would see the triples generated as:

    <http://example.org#test1> <rdf:value> <http://example.org/test2> .
    <http://example.org#> <rdf:value> <http://example.org#test1> .

The reasoning being:

rdf:ID="test1" -> <http://example.org#test1>
    The base URI is valid, so needs no correction. The fragment is simply
appended to the base URL.

rdf:resource="test2" -> http://example.org/test2
    "test2" is a relative path "/test2", which is also then appended to the
base URL. This is
    actually the only one of your examples that causes a problem since
RFC2396 doesn't actually
    cope very well with the situation of a base URI with no trailing slash,
which then has a
    relative URI appended.

rdf:about="" -> http://example.org#
    An empty rdf:about attribute means that it refers to *the start* of the
document (as defined
    in both RDFMS and RFC2396). This means it has a fragment identifier of
'#'.

rdf:resource="#test1" -> http://example.org#test1
    The resource refers to an ID, so the fragment is simply added to the
base URL.

Regards,

Mark


Mark Birbeck
Managing Director, x-port.net
Co-author Professional XML, and Professional XML Meta Data, both by Wrox
Press

E: Mark.Birbeck@x-port.net
T: +44 20 7878 1509
M: +44 7774 102 413
W: http://www.x-port.net/
Received on Tuesday, 4 December 2001 05:30:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:52 GMT