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

Re: does RDF require understanding all 82 URI schemes?

From: Aaron Swartz <aswartz@swartzfam.com>
Date: Sat, 10 Feb 2001 22:11:23 -0800
To: Dan Brickley <danbri@w3.org>, Dave Beckett <dave.beckett@bristol.ac.uk>
CC: David Megginson <david@megginson.com>, <www-rdf-interest@w3.org>
Message-ID: <B6AB4063.223DA%aswartz@swartzfam.com>
Dan Brickley <danbri@w3.org> wrote:

>>>> I feel it might be needed for serialisation of the RDF graph to
>>>> RDF/XML, but I haven't implemented that yet.
>>> Unfortunately, the serialization of an RDF graph is impossible in the
>>> general case: the XML Namespaces spec describes two-part names, but
>>> RDF treats them as single part names, and the act of combining the two
>>> is lossy. ...
>> I appreciated this, which is why in Redland I'll probably start
>> recording namespace URIs/prefixes in the RDF model just for
>> re-serialisation purposes something like
>> 
>> [model URI] -> [redland:hasXMLnsPrefix] -> "xmlns:foo=http://foo.com/ns"]
> Maybe we could agree to use eg dc:title or rdfs:label for this, to express
> preferred namespace prefixes of a vocabualry?

For SWAG[1] I've proposed a similar term as part of MetaVocab[2]. I don't
think reusing another property would be a good idea since things could
quickly get confused. In my own databases I've set up an
internally-maintained constraint of a unique 1:1 correspondence of URIs to
prefixes.

However, it is important to remember that since RDF simply concatenates the
URIs, it is not necessary to store this information to re-serialize. For
example:

xmlns:foo="http://foo.com/ns"
foo:bar -> http://foo.com/nsbar

    To re-serialize, you simply break the URI at the first character not
    allowed in a Qname (here a /).

xmlns:a="http://foo.com/"
http://foo.com/nsbar <- a:nsbar

Sure, the re-serialized graph will not contain the same namespace URIs as
the original, but to an RDF parser this will make no difference. (This will
eventually cause a problem for XML signatures, since the Canonical XML will
be different. Perhaps we need a Canonical RDF? Would it just be a list of
triples?)

[1] http://purl.org/swag/
[2] http://webns.net/mvcb/

-- 
[ Aaron Swartz | me@aaronsw.com | http://www.aaronsw.com ]
Received on Saturday, 10 February 2001 23:12:13 GMT

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