Extension:LightweightRDFa

The lightweight RDFa extension outputs simple semantic data in the RDFa form out of Mediawiki links. This extension provides part of the Semantic Mediawiki extension annotation (but does not depend on it).

We follow wikipedia's idea and allow free text for semantic annotation. For the semantic output we use:
 * The page URI as subject.
 * The annotated link targets as objects.
 * The predicate is created from the free text by removing the whitespace, transforming it in camel case form and putting it under the "$wgServer . $wgScriptPath . '/property#" namespace

Copying the exact SMW functionality through Mediawiki hooks only has some issues: Thus, to get out of beta phase, we are looking for either help for alternative hooks or help for alternative tokens
 * extracting annotations with '::' may break some cases for link pipes
 * The parser removes the leading ':' from a link so lihkBegin hook cannot handle them (we use '^^' for now)

Installation
You should also change the HTML DocType. Mediawiki offers either HTML5 i.e.


 * $wgHtml5 = true;
 * $wgHtml5Version='HTML+RDFa 1.0';
 * $wgHtml5Version='HTML+RDFa 1.0';

or HTML v. <= 4 i.e.


 * $wgDocType='-//W3C//DTD XHTML+RDFa 1.0//EN';
 * $wgDTD='http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd';
 * $wgDTD='http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd';