Reading and writing all those long URIs is painful. RDF re-uses the XML _namespace _idea to abbreviate URIs.
RDF language primitives are defined (by RDFS) in the namespace
http://www.w3.org/1999/02/22-rdf-syntax-ns#
Which is conventionally abbreviated by “rdf”, so the first part of an RDF document in Turtle always looks something like this: 通常缩写为“rdf”,所以海龟中的RDF文档的第一部分通常是这样的:
@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# .
@prefix ex: http://example.org/ .
Here we have introduced the essential “rdf” namespace, and also our own “ex” namespace. A prefix simply defines a simple macro abbreviation for the leftmost part of a URI, and also means we no longer need to use the “<” and “>” symbols to denote a URI. 这里我们已经介绍了基本的“rdf”名称空间,以及我们自己的“ex”名称空间。前缀只是为URI最左边的部分定义了一个简单的宏缩写,也意味着我们不再需要使用“<”和“>”符号来表示URI。
So after making this prefix declaration, instead of writing http://example.org/publishedBy we can write simply ex:publishedBy 所以在做了这个前缀声明之后,我们可以简单地写ex:publishedBy,而不是写< http://example.org/publishedBy >
We can go one step further. By declaring an exmpty prefix as follows 我们可以更进一步。通过如下声明一个空前缀
@prefix : http://example.org/ .
we can now write 我们现在可以写成
:publishedBy
Obviously this latter style of empty prefix abbreviation can only be used for one namespace within a Turtle document.