Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Just use popular RDF namespace prefixes from
C++ Perl

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Working with RDF data is cumbersome, unless you define namespaces and prefixes for abbreviation. Defining namespaces, however, is also cumbersome because you need to repeat this step in every environment. This is silly because in most cases we use the same URI namespaces anyway. Some popular examples:

@prefix owl: <> .   (Turtle/N3)

PREFIX rdf: <>   (SPARQL)

xmlns:foaf=""   (RDF/XML)

Fortunately there is, a registry where people can vote the most popular URI namespaces. It is best practice to use the same prefixes as defined there. The Perl module RDF::NS contains regular snapshots from for easy reuse without having to download them in every application.

In short, you can get a full prefix-to-namespace mapping as blessed hash with


The only argument to the constructor is the version number, that is equivalent to the date of a particular snapshot. The changelog in the file Changes lists all snapshots with their modifications. RDF::NS provides some handy methods, for instance you can use method-calls to create full URIs:

$ns->rdf_type; # returns ""

The subclass RDF::NS::Trine, shipped with RDF::NS returns blessed URI objects instead of plain strings, as expected by RDF::Trine. Please have a look at the documentation for more information.

The source code of RDF::NS is available at with releases at

Build Status Coverage Status

Something went wrong with that request. Please try again.