Jeremy Carroll
Copyright © 2005 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
This directory gives an XSLT2 implementation for RDF/A.
The goal is to be an initial implementation, that is fairly easy to change as the rules change.
This is not intended as a production implementation, and misses features such as validation, efficiency and error handling that would be required in a production implementation.
The current status is an initial, untested prototype.
The heart of the system is a set of rules for subject, predicate and object, taken from the specification.
These rules are transformed into an XSLT program, which in turn can transform an XML document with RDF/A attributes into an RDF/XML document. Hence we distinguish between compile-time transformation, which processes the rules, and run-time transformation which processes XHTML2.
The first compile-time transformation combines the rules for S, P and O into a set of rules for SPO matches.
The second compile-time transformation takes the SPO matches and turns them into XSLT.
The run-time transformation uses the output of the compile-time transformation, and an imported module, to transform XHTML2 into RDF/XML.
The files in this directory are as follows:
There are numerous TODOs scattered through the code. The most significant is reification.
$ grep TODO * base.xsl: TODO use sensible namespace for my:, and change prefix base.xsl: TODO assumes that the bnode is legal NCNameChars base.xsl: TODO assumes bare-infix is : base.xsl: TODO ncname here base.xsl: TODO this code assumes infix of length 1 rules2xslt.xsl:TODO Reification rules2xslt.xsl:TODO Testing rulesA.xml: TODO reification rules of 5.3 testRDFA.xml: TODO correct URI for dc. Many more tests.
Also a major tidy-up would be in order.
A further limitation is that the code assumes the value of a property rel or rev attribute is actually a qname.
The rel="next" etc functionality has not been implemented.