CC License Rdf Overview

From Creative Commons
Jump to: navigation, search

The purpose of this article is basic documentation of the directories within the cc.licenserdf project.


License RDF Files

This directory contains an rdf file for every license we have. Each file is named to match the url path to it on the cc website, where underscores are replaced by slashes. An example of this is so:

  • cc/licenserdf/licenses/creativecommons.org_publicdomain_zero_1.0_.rdf

Which corresponds to this page.

The cc:legalcode Node(s)

If the jurisdiction for one of these licenses has one translation available for its legal code; then there is only one instance of this node in the rdf file for that license. This node contains the url to the legal code's page in its rdf:resource attribute.

If the jurisdiction has multiple translations available, there will be multiple instances of this node within the RDF file. There will also be instances of an additional node, called rdf:Description. The rdf:Description instances also contain the same url to the legal code, but under their rdf:about attribute. The rdf:Description instances each all have a child node dcq:language, who's inner text is the locale abbreviation for that translation.

It is the cc:legalcode and rdf:Description nodes that directly impact what links to legal code will appear on the deed's page.

The dc:title Nodes

These nodes are generated automatically by scripts in the project's tools directory.

d:title xml:lang="i18n"

This is a special instance of the dc:title node, identified by having "i18n" as the language name, instead of a locale abbreviation. The contents of this node is a python string template, and is used by a script to generate the other translation nodes for the subject predicate combination described by the string template.

The presence of this is a hack, not a standard practice; and may be unique to our codebase.

In the rdf:resource attribute, each instance of this node contains a link to a different button graphic for the license, which ideally one displays proudly with the licensed content whatever webpage it appears upon. While many licenses will use the same images, each license variation contains a different url for its images. This is so we can use traffic statistics to get a good picture on the actual usage of our licenses, and which versions there of.



To quote Chris, "too be honest, I've never touched it." ... Alright then =)


This file is automatically generated by a script. It is the combination of all of the rdf files in the cc/licenserdf/license folder.


This file used to be for determining which languages to use for jurisdictions, but it may be no longer in use.


Same as Outlines the terms in the namespace for CC REL. Contains a link to schema.rdf.


The RDFa contents of (ns.html), but in the RDF/XML format. This would only ever need to be modified if we add more terms in our namespace.


Unit tests for this project.


This tool might not be in use anymore.

This tool automatically generates the <dc:title xml:lang="i18n"> nodes in the various rdf files in the cc.licenserdf/license/ directory. This was implemented during the sanity project.


This file contains tools for adding, launching & getting info about jurisdictions. Details on usage are out of the scope of this article.

This tool generates the index.rdf file.

To quote Chris again, "Looks interesting, but I've never touched it".

Contains miscellaneous tools for the project, much as cc/licenserdf/ also does. This separation between the two files is not due to any particular design decision, but rather is a quirk. The two files probably could be merged together at some point. (Is this accurate?)

Automatically generates translations via the xml:lang="i18n" string template nodes.