Warm tip: This article is reproduced from serverfault.com, please click

RDF hash vs slash vocabularies (and the rest)

发布于 2015-10-13 10:42:34

I can’t grasp the idea in the case of namespaces and their hash or slash nature. I understand to both of them but I have met another one notation, without a hash or a slash. Particularly in a book I am reading (Mannings: Linked Data) there is a couple of examples using a small schema saved in a Turtle formatted file. These examples use this prefix:

@prefix wish: <http://purl.org/net/WishListSchema> .

This results in (translation to JSON-LD):

 "http://purl.org/net/WishListSchemwish_list_item": 

In the case I add a hash/slash to the prefix, it looks more reasonably:

 "wish:wish_list_item":

Maybe I don’t understand properly to the vocabulary/schema difference, I don’t know.

Is the notation without a hash or a slash common? Where is the problem?

Questioner
Honza Hejzl
Viewed
0
Daniel Garijo 2015-10-13 22:30:30

The notation without slash or hash is not common. I haven't seen a vocabulary using that convention. And in the W3C recommendation they only provide recipees for slash and has URIs: http://www.w3.org/2001/sw/BestPractices/VM/http-examples/2006-01-18/#naming

Actually, if you use the one listed in your example, it may be considered slash notation, but every term in your vocabulary would start with "WishListSchema_".

From the derreferenceability point of view, the example would also lead to problems if you use purl, as you would have to create a different purl for each concept of your vocabulary. Instead, if you use something like http://purl.org/net/WishListSchemwish# you could redirect the URL to you server and use the appropriate recipee for publising the vocabulary.