Are RDF URI references ugly?

Friday, November 12, 2004

In RDF, you use fragment identifiers to identify concepts as a URI reference. After wrapping my mind around the idea that a simple '#' can change a URI to mean anything, I set myself to work on the magazine ontology for my project.

From good URI design, you learn how to generate URIs that look like http://www.example.com/2004/11/12/whatever. The namespace for my vocabulary is not an issue - http://example.com/ns/publication# . That means that I can use pub:Issue element and it will expand to http://example.com/ns/publication#Issue . The problem occurs when I try to use this design pattern to identify instances of my magazines. Consider the following rdf:about attributes I had created before reading about The Hash:

<Publication rdf:about="http://example.com/mypub/">
<Issue rdf:about="http://example.com/mypub/2004/11/">
<Section rdf:about="http://example.com/mypub/2004/11/tech/">
<Story rdf:about="http://example.com/mypub/2004/11/tech/rdffun">

Nice looking, no? Now let's try to change the URI to use the fragment identifier:

<Publication rdf:about="http://example.com/pub#mypub">
<Issue rdf:about="http://example.com/mypub/2004/volume#11">
<Section rdf:about="http://example.com/mypub/2004/11/section#tech">
<Story rdf:about="http://example.com/mypub/2004/11/tech#rdffun">

Something just doesn't feel right about these URIs. They look... ugly.
Considered individually, they don't bother me as much. Another example:

<Page rdf:about="http://example.com/mypub/2004/11/page#5">

Maybe I'll get used to it...