sparqlrdfuuidsemantic-weburn

Best practice to use urn namespace in rdf


TLDR: What is the best practice to use urn namespace?

Full Context:

Hi,

I want to create a class with a data property that has urn:uuid as range, so did some research on what is the best practice to use urn namespace. The purpose is to represent identifier.

When I use the urn namespace in Jena Fuseki, it automatically creates the prefix: PREFIX urn: <http://fliqz.com/>.

However, when I accessed http://fliqz.com, it didn't seem related to the urn namespace.

Therefore, I look into the RFC 8141: Uniform Resource Names (URNs), but found no specifications for the prefix declaration. Though, it claims:

A Uniform Resource Name (URN) is a Uniform Resource Identifier (URI) that is assigned under the "urn" URI scheme and a particular URN namespace, with the intent that the URN will be a persistent, location-independent resource identifier.

I expected something like PREFIX urn: <http://fliqz.com/> from the RFC 8141.

The question What is the intended way to reference a URN in RDF? is the most similar question, but the answer treats urn as naming convention of rdf:resource. It mentioned RDF/XML Syntax Specification, but the document does not have specification regarding urn.

What is the best practice to use urn namespace?

Thanks!


Edit 1 for @AndyS

Thank you for helping me out! This is Jena Fuseki SPARQL GUI on empty graph database and when I type urn: namespace, it immediately adds PREFIX urn: <http://fliqz.com/> above.

Jena Fuseki URN namespace


Solution

  • The misunderstanding is that urn: identifies an RDF namespace ‒ it does not, it is a URI scheme, like http. In Turtle or SPARQL, you would use the URI syntax, like <urn:uuid:29d82556-7fac-4ab8-b1a1-a652d4b1ee36>. Typing urn: seems to confuse the GUI which tries to look for a commonly used prefix with this name.

    It just so happened that prefix.cc used to have a URI prefix defined for urn:, which seems to have been removed only recently. I suppose the Jena GUI had it cached.

    If you want to define a prefix to be used, you can use PREFIX urn: <urn:> or even PREFIX uuid: <urn:uuid:>.