W3C

RDFa Implementation Report

Editor's Draft

This version:
$Id: Overview.html,v 1.26 2010/02/04 17:33:42 mhausenb Exp $
Latest version:
http://www.w3.org/2006/07/SWD/RDFa/implementation-report
Editors:
Michael Hausenblas (DERI)
Ben Adida (Creative Commons)

Abstract

This document reports on implementations of the RDFa in XHTML: Syntax and Processing [RDFa Syntax], that is, implementations that are able to parse an XHTML+RDFa document and generate an RDF graph according to the processing rules. The main purpose of this document is to show that each feature of the RRDFa in XHTML: Syntax and Processing [RDFa Syntax] has been implemented by demonstrating interoperable implementations of each feature. To evaluate the coverage of an implementation's features, the RDFa Test Cases are used as a point of reference.

Status of this document

This is an Editor's Draft, hence work in progress. Publication as a Editor's Draft does not imply endorsement by the W3C Membership. As this is a draft document, it may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

The worked described herein has been produced by the RDF in HTML Task Force [RDFHTML-TF], a joint task force of the Semantic Web Deployment Working Group [SWD-WG] and XHTML2 Working Group [XHTML2-WG].

For comments, please send a mail to [email protected], with http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/ being the public archive.

Last Modified: $Date: 2010/02/04 17:33:42 $


Table of Contents

  1. Introduction
  2. RDFa Processors
    1. Server-side RDFa Processors
    2. Client-side RDFa Processors
  3. Implementation Test Results
  4. RDFa Tools

  5. References
  6. Acknowledgements

1. Introduction

The goal of this report is to verify if the RDFa in XHTML: Syntax and Processing [RDFa Syntax] specification is implementable. Consequently, the report does not attempt to test the conformance of the implementations. Regarding the PR entrance criteria we note that at least two implementations have been demonstrated that pass all tests in the test suite.

To evaluate the coverage of an implementation's features, the [RDFa Test Cases] are used as a point of reference. We note that for ensuring a stable test environment, a frozen version of the RDFa Test Cases is used as of the decision from 2008-07-31 by the RDF in HTML Task Force [RDFHTML-TF].

There are 98 approved test cases in total which can be evaluated by executing the following query:

prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix test: <http://www.w3.org/2006/03/test-description#>

select * where { 
 ?TC rdf:type test:TestCase ;
     test:reviewStatus test:approved .
}

2. RDFa Processors

In the following the RDFa processors are listed that have been used in the RDFa Implementation Report. We differentiate between server-side processors which typically run as a kind of Webservice on a server and take some kind of XHTML+RDFa as input (via URI, etc.) and client-side processors, working on the client side (e.g. as a UA plug-in).

2.1 Server-side RDFa Processors

Server-side implementations are usually evaluated using Manu Sporny's RDFa Test Harness.

Table 1.: Server-side RDFa Processors.
Name Contact Programming Language Home Service URI
RDFa2RDFXML (XSLT) Fabien Gandon XSLT http://ns.inria.fr/grddl/rdfa/ http://ns.inria.fr/grddl/rdfa/2008/04/08/RDFa2RDFXML.xsl
RDFa Distiller (PyRDFa) Ivan Herman Python http://www.w3.org/2007/08/pyRdfa/ http://www.w3.org/2007/08/pyRdfa/extract?uri=
librdfa Manu Sporny C http://rdfa.digitalbazaar.com/librdfa/ http://rdfa.digitalbazaar.com/librdfa/rdfa2rdf.py?uri=
SPREAD Shane McCarron Perl http://htmlwg.mn.aptest.com/rdfa/ http://htmlwg.mn.aptest.com/rdfa/extract_rdfa.pl?format=xml&uri=
ARC2 Benjamin Nowack PHP http://arc.semsol.org/download http://arc.web-semantics.org/demos/rdfa_tests/extract.php?url=
shark Florian Schmedding C# http://shark.informatik.uni-freiburg.de/ http://shark.informatik.uni-freiburg.de/Ocean/SharkWeb.asmx/Parse?url=
Swignition Toby Inkster Perl http://buzzword.org.uk/cognition/ http://buzzword.org.uk/swignition/try

2.2 Client-side RDFa Processors

Client-side implementations are usually evaluated using Elias Torres' RDFa Test Harness.

Table 2.: Client-side RDFa Processors.
Name Contact Environment Home
Operator Michael Kaply, Elias Torres Firefox Plug-in http://www.kaply.com/weblog/operator/
RDFa in Javascript Ben Adida Javascript http://www.w3.org/2006/07/SWD/RDFa/impl/js/20080817/

3. Implementation Test Results

The following Table 3. lists the results of the implementation test. In total nine (9) implementations are included (seven server-side and two client-side). Four (4) implementations, namely RDFa2RDFXML (XSLT), RDFa Distiller (PyRDFa), librdfa, and SPREAD) pass ALL test cases [RDFa Test Cases], the other implementations pass MOST of them. Wherever possible, the test results have been created automatically using the EARL output of the RDFa Test Harnesses along with an XSLT.

Table 3.: Results for Server-side RDFa Processors.
Test Purpose RDFa2RDFXML (XSLT) RDFa Distiller (PyRDFa) librdfa SPREAD (Shane's Perl RDFa Eats All Data) ARC2 shark Swignition Operator RDFa in Javascript Summary
legend: + ... pass, o ... fail
Test0001 Tests @property to establish the predicate; literal object is in the content of the element. pass pass pass pass pass pass pass pass pass +++++++++
Test0006 Tests @rev and @rel together, with the object being specified by @href, ignoring content pass pass pass pass pass pass pass pass pass +++++++++
Test0007 Tests @rel, @rev, @property, and @content together to generate several RDF triples. pass pass pass pass pass pass pass pass pass +++++++++
Test0008 Tests empty @about. pass pass pass pass pass pass pass pass pass +++++++++
Test0009 Tests @rev. pass pass pass pass pass pass pass pass pass +++++++++
Test0010 Tests @rel, @rev, and @href to generate two RDF triples. pass pass pass pass pass pass pass pass pass +++++++++
Test0011 Tests XMLLiteral content pass pass pass pass pass pass pass fail fail +++++++oo
Test0012 Tests @xml:lang pass pass pass pass pass pass pass pass pass +++++++++
Test0013 Tests @xml:lang inheritance pass pass pass pass pass pass pass pass pass +++++++++
Test0014 Tests setting the @datatype to xsd:integer pass pass pass pass pass pass pass pass pass +++++++++
Test0015 Tests meta and link with no parent @about pass pass pass pass pass pass pass pass pass +++++++++
Test0017 Tests creation of statements involving explicitly created blank nodes. pass pass pass pass pass pass pass pass pass +++++++++
Test0018 Tests @rel to establish predicate. pass pass pass pass pass pass pass pass pass +++++++++
Test0019 Tests @about to establish subject. pass pass pass pass pass pass pass pass pass +++++++++
Test0020 Tests @about inheritance to establish subject. pass pass pass pass pass pass pass pass pass +++++++++
Test0021 Tests inheritance of subject when no @about can be found pass pass pass pass pass pass pass pass pass +++++++++
Test0023 Tests that @id does not generate subjects pass pass pass pass pass pass pass pass pass +++++++++
Test0025 Tests simple chaining with cascade of @resource and @property pass pass pass pass pass pass pass pass pass +++++++++
Test0026 Tests @content for literal object pass pass pass pass pass pass pass pass pass +++++++++
Test0027 Tests @content for literal object, overriding element content. pass pass pass pass pass pass pass pass pass +++++++++
Test0029 Tests markup stripping from a span element with @datatype=xsd:string pass pass pass pass pass pass pass pass pass +++++++++
Test0030 Tests omitted @about. pass pass pass pass pass pass pass pass pass +++++++++
Test0031 Tests if @resource sets URIref object correct. pass pass pass pass pass pass fail pass pass ++++++o++
Test0032 Tests if @resource overrides @href to set the URIref object. pass pass pass pass pass pass fail pass pass ++++++o++
Test0033 Tests simple chaining with cascade of bNode and @property pass pass pass pass pass pass pass pass pass +++++++++
Test0034 Tests if a @src (in img element) correctly sets the URIref object pass pass pass pass pass pass pass pass pass +++++++++
Test0035 Tests if @href overwrites @src pass pass pass pass pass pass pass pass pass +++++++++
Test0036 Tests if @resource overwrites @src pass pass pass pass pass pass pass pass pass +++++++++
Test0037 Tests if @resource overwrites both @href and @src pass pass pass pass pass pass pass pass pass +++++++++
Test0038 Tests if a @src (in img element) correctly sets the URIref subject (due to @rev) pass pass pass pass pass pass pass pass pass +++++++++
Test0039 Tests if @href overwrites @src correctly to set the URIref subject (due to @rev) pass pass pass pass pass pass pass pass pass +++++++++
Test0040 Tests if @resource overwrites @src correctly to set the URIref subject (due to @rev) pass pass pass pass pass pass pass pass pass +++++++++
Test0041 Tests if @resource overwrites both @href and @src correctly to set the URIref subject (due to @rev) pass pass pass pass pass pass pass pass pass +++++++++
Test0042 Tests if a @src (in img element) correctly sets the URIref object (with omitted @about) pass pass pass pass pass pass pass fail fail +++++++oo
Test0046 Tests @typeof with @rel present, no @href, @resource, or @about pass pass pass pass pass pass pass pass pass +++++++++
Test0047 Tests @typeof with @rel and @resource present, no @about pass pass pass pass pass pass pass pass pass +++++++++
Test0048 Tests @typeof with @about and @rel present, no @resource pass pass pass pass pass pass pass pass pass +++++++++
Test0049 Tests @typeof with @about, no @rel or @resource pass pass pass pass pass pass pass pass pass +++++++++
Test0050 Tests @typeof without anything else pass pass pass pass pass pass pass pass pass +++++++++
Test0051 Tests @typeof with a single @property pass pass pass pass pass pass pass pass pass +++++++++
Test0052 Tests to ensure that @typeof does not apply to @resource pass pass pass pass pass pass pass pass pass +++++++++
Test0053 Tests to make sure that @typeof does not apply to @resource, but @resource sets the subject for the next triple to be generated pass pass pass pass pass pass pass pass pass +++++++++
Test0054 Tests multiple @property separated by white spaces pass pass pass pass pass pass pass pass pass +++++++++
Test0055 Tests multiple @rel separated by white spaces pass pass pass pass pass pass pass pass pass +++++++++
Test0056 Tests if @typeof applies to @about on same element with hanging @rel pass pass pass pass pass pass pass pass pass +++++++++
Test0057 Tests if hanging @rel creates multiple triples pass pass pass pass pass pass pass pass pass +++++++++
Test0058 Tests if hanging @rel creates multiple triples with @typeof permutation pass pass pass pass pass pass pass pass pass +++++++++
Test0059 Tests multiple hanging @rels with multiple children pass pass pass pass pass pass pass pass pass +++++++++
Test0060 Tests conformance with UTF-8 encoding pass pass pass pass pass pass pass pass pass +++++++++
Test0061 Tests @rel in head using reserved, non-prefixed XHTML value pass pass pass pass pass pass pass pass pass +++++++++
Test0062 Tests @rev in head using reserved, non-prefixed XHTML value pass pass pass pass pass pass pass pass pass +++++++++
Test0063 Tests @rel in head using reserved XHTML value and empty-prefix CURIE syntax pass pass pass pass pass pass pass pass pass +++++++++
Test0064 Tests if @about generates a proper triple when a safe CURIE is used pass pass pass pass pass pass pass pass pass +++++++++
Test0065 Tests if @rel properly connects triples generated when safe CURIEs are used pass pass pass pass pass pass pass pass pass +++++++++
Test0066 Test to make sure that @about (with current document) is implied in the head, and the proper triples are generated using @typeof pass pass pass pass pass pass pass pass pass +++++++++
Test0067 Test to make sure that @property in head uses the implied current document as the subject if no other subject is specified pass pass pass pass pass pass pass pass pass +++++++++
Test0068 Tests to ensure that relative URI is resolved correctly when used in @about pass pass pass pass pass pass pass pass pass +++++++++
Test0069 Tests to ensure that relative URI is resolved correctly when used in @href pass pass pass pass pass pass pass pass pass +++++++++
Test0070 Tests to ensure that relative URI is resolved correctly when used in @resource pass pass pass pass pass pass pass pass pass +++++++++
Test0071 Tests to ensure that a triple is generated even if @typeof and @about is not specified anywhere in the document pass pass pass pass pass pass pass pass pass +++++++++
Test0072 Tests to ensure that relative URIs are resolved correctly when used in @about with XHTML base set in head pass pass pass pass pass pass pass pass pass +++++++++
Test0073 Tests to ensure that relative URIs are resolved correctly when used in @resource with XHTML base set in head pass pass pass pass pass pass pass pass pass +++++++++
Test0074 Tests to ensure that relative URIs are resolved correctly when used in @href with XHTML base set in head pass pass pass pass pass pass pass pass pass +++++++++
Test0075 Tests to ensure that the XHTML+RDFa reserved word 'license' when used in @rel (with no @about) generates the proper triple pass pass pass pass pass pass pass pass pass +++++++++
Test0076 Tests to ensure that all reserved XHTML words are supported in @rel pass pass pass pass pass pass pass pass pass +++++++++
Test0077 Tests to ensure that all reserved XHTML words are supported in @rev pass pass pass pass pass pass pass pass pass +++++++++
Test0078 Tests multiple ways of handling incomplete triples; the first two triples should use the same bnode as subject ('merged'). The third should have a separate bNode. pass pass pass pass pass pass pass pass pass +++++++++
Test0079 Tests role of @resource and @href in completing incomplete triples (including their mutual priorities) pass pass pass pass pass pass pass pass pass +++++++++
Test0080 Tests if @about has a higher priority than @resource in handling incomplete triples pass pass pass pass pass pass pass pass pass +++++++++
Test0081 Tests multiple ways of handling incomplete triples, this time with @rev pass pass pass pass pass pass pass pass pass +++++++++
Test0082 Tests multiple ways of handling incomplete triples, this time with both @rel and @rev pass pass pass pass pass pass pass pass pass +++++++++
Test0083 Tests multiple ways of handling incomplete triples; the first two triples should use the same bNode as subject ('merged'); the third case should use @about pass pass pass pass pass pass pass pass pass +++++++++
Test0084 Tests multiple ways of handling incomplete triples, this time with both @rel and @rev. There is an intermediate div that should be ignored by the process pass pass pass pass pass pass pass pass pass +++++++++
Test0085 Tests the role of @resource and @href in completing incomplete triples (including their mutual priorities), but with an intermediate layer (ie, bNode) added pass pass pass pass pass pass pass pass pass +++++++++
Test0086 Test that NO triple should be generated for a non-reserved @rel value pass pass pass pass pass pass pass pass fail ++++++++o
Test0087 Tests to ensure that all reserved XHTML words are supported in @rel (with :xxx) pass pass pass pass pass pass pass pass pass +++++++++
Test0088 Test the interpretation of the CURIE "_:" pass pass pass pass pass pass pass pass pass +++++++++
Test0089 Tests to ensure that @src sets a new subject (focuses on @typeof). pass pass pass pass pass pass pass pass pass +++++++++
Test0090 Tests to ensure that @src sets a new subject (focuses on @rel/@href). pass pass pass pass pass pass pass pass pass +++++++++
Test0091 Tests to ensure that non-reserved, un-prefixed CURIEs, when used in @property, generate triples. pass pass pass pass pass pass pass pass pass +++++++++
Test0092 Tests the explicit specification of an RDF XMLLiteral with @datatype. pass pass pass pass pass pass pass fail fail +++++++oo
Test0093 Tests the explicit specification of an RDF XMLLiteral with @datatype using a non-RDF namespace, yielding a user-data-typed literal pass pass pass pass pass pass fail pass pass ++++++o++
Test0094 Tests the explicit specification of an RDF XMLLiteral with @datatype using the proper RDF namespace, but with an unusual prefix - bla: pass pass pass pass pass pass pass fail fail +++++++oo
Test0099 Tests the preservation of white space in literals. pass pass pass pass fail pass fail fail fail ++++o+ooo
Test0100 Tests XML elements with explicit namespace. Each of the XML elements in the literal should have at least those namespaces declared that are used in that literal (more is acceptable) pass pass pass pass pass fail fail fail fail +++++oooo
Test0101 Tests XML elements with explicit namespace. Each of the XML elements in the literal should have at least those namespaces declared that are used in that literal (more is acceptable). Furthermore, the xml:lang should also be set for each of those elements. pass pass pass pass pass fail fail fail fail +++++oooo
Test0102 Tests XML elements with explicit namespace. Each of the XML elements in the literal should have at least those namespaces declared that are used in that literal (more is acceptable). Furthermore, the xml:lang should also be set on the first element but existing language declaration should not be changed. pass pass pass pass pass fail fail fail fail +++++oooo
Test0103 Tests XML elements with explicit namespace. Each of the XML elements in the literal should have at least those namespaces declared that are used in that literal (more is acceptable), but locally set namespaces should not be changed; i.e., the default namespace for the svg element should remain unchanged in the output pass pass pass pass fail fail fail fail fail ++++ooooo
Test0104 Tests rdf:value with blank nodes to give a value with a unit pass pass pass pass pass pass pass pass pass +++++++++
Test0105 Test the behavior of triple generation in a corner case where the inner @rel is neither a CURIE or a LinkType. This test effectively causes a rel="" to be inserted between the outer div subject and the inner @href, which halts chaining. pass pass pass pass fail pass pass fail pass ++++o++o+
Test0106 Tests the behavior of triple generation in the case where the inner @rel is defined, but is blank, which halts chaining. pass pass pass pass fail pass pass fail pass ++++o++o+
Test0107 Checks to make sure that that while we shouldn't garbage collect bnodes no triples are generated. pass pass pass pass pass pass pass fail fail +++++++oo
Test0108 Checks to make sure that the RDFa parser emits a plain literal when the datatype is specified as "" and preserves the xml:lang value. The text, with control characters and whitespace preserved, reads "Greek\nwhite space\n". pass pass pass pass pass pass fail fail fail ++++++ooo
Test0109 Tests to make sure that @xml:base is ignored in XHTML+RDFa 1.0. The input test document is invalid XHTML. pass pass pass pass pass pass pass pass pass +++++++++
Test0110 Tests to make sure that a bNode is generated even though no nested @about exists. pass pass pass pass pass pass pass pass pass +++++++++
Test0111 Tests to make sure that two bNodes are generated after three levels of nesting and that the last div does not generate a triple. pass pass pass pass pass pass pass pass pass +++++++++
Test0112 Checks to make sure that the RDFa parser emits a plain literal when the datatype is specified as "". pass pass pass pass pass pass fail fail fail ++++++ooo
Test1001 Tests Vevent using @typeof (inlc. dtstart, dtend, etc.) pass pass pass pass pass pass pass pass pass +++++++++

4. RDFa Tools

A couple of tools that produce and/or consume RDFa are available, already. In the following, a short overview is given. Note as well that there is a living document maintained at http://rdfa.info/wiki/Tools.

  1. Browser Plug-ins (Firefox Plug-in Operator, Fuzzbot, Semantic Radar, bookmarklets, etc.)
  2. Editors (TopBraid, Amaya)
  3. Others (OpenLink Virtuoso, SPARQLBot, etc.)

References

[XHTML2-WG]
XHTML2 Working Group, see http://www.w3.org/MarkUp/ .
[SWD-WG]
Semantic Web Deployment Working Group, see http://www.w3.org/2006/07/SWD/ .
[RDFHTML-TF]
RDF-in-HTML Task Force, see http://w3.org/2001/sw/BestPractices/HTML/ .
[RDFa Syntax]
RDFa in XHTML: Syntax and Processing, Ben Adida, Mark Birbeck, Shane McCarron and Steven Pemberton, W3C Candidate Recommendation, 20 June 2008 http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/ . Latest version available at http://www.w3.org/TR/rdfa-syntax/ .
[RDFa Test Cases]
RDFa Test Cases, Michael Hausenblas, Manu Sporny, 31 July 2008 http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases-20080731/ . Latest version available at http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/ .

Acknowledgements

This document is the result of discussions within the RDF in HTML Task Force. The editors would like to thank Manu Sporny for creating an excellent Test Harness producing directly usable EARL documents which have been used as the main input for this report and Elias Torres for the JavaScript version of it. Further, we want to thank all the implementors - thanks for the great work and your patience. Finally, Carlos Tejo Alonso, Ivan Herman, and Dan Connolly thank you for your feedback on editorial issues.

Changes since Proposed Rec:

$Log: Overview.html,v $
	
Revision 1.26  2010/02/04 17:33:42  mhausenb
	
removed  outdated note from server-side section as well and added DanC to ack section
	
	
Revision 1.25  2010/02/04 16:46:35  mhausenb
	
removed "We note that due to issues that are out of the scope of the RDFa specification (such as URI normalization, etc.) ..." due to http://chatlogs.planetrdf.com/swig/2010-02-04.html#T16-20-03