W3C

Warning!

The test suite described by, and referred to, in this document is now obsolete and is not maintained any more. With the publication of RDFa 1.1 in 2012, a new and more complete test suite has been set up at rdfa.info. New implementations of RDFa 1.0 or RDFa 1.1 should use that new test suite rather than this one. (Note that the new test suite is also usable to test RDF 1.0 implementations.)

Last Modified: $Date: 2013/02/05 09:12:41 $

RDFa Test Suite

Editor's Draft

This version:
$Id: Overview.html,v 1.26 2013/02/05 09:12:41 ivan Exp $
Latest version:
http://www.w3.org/2006/07/SWD/RDFa/testsuite/
Previous version:
This is a draft version for the first approval of the RDFa XHTML Test Cases
Editors:
Michael Hausenblas (JOANNEUM RESEARCH)
Wing C Yung (IBM)

Abstract

The RDFa Test Suite defined in this document is part of the [RDFa] specification, containing normative sections. The RDF in HTML Task Force [RDFHTML-TF] provides a set of test cases that are defined in this document. This document describes the types of tests, their format, and how to use them. The Test Runner helps to test REST-based RDFa extractors automatically.

This document conforms with the Test Metadata document of the Quality Assurance Working Group; the Test Development FAQ helps answering potential further questions regarding test rationals.

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 HTML Working Group [HTML-WG].

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


Table of Contents

  1. Introduction
  2. Test Partitioning
  3. Conformance
  4. RDFa Tests
  5. Manifest Files

  6. References
  7. Acknowledgements

1. Introduction

The test cases defined in this document are part of the [RDFa] specification. The RDF in HTML Task Force [RDFHTML-TF] provides a set of test cases that are explained in this document. This document describes the test types, and their intended usage.

Scope

This test suite provides for an RDFa conformance test. According to the Test Development FAQ, conformance testing focuses on testing what is formally required in a specification in order to verify whether an implementation conforms to its specifications. Conformance testing does not focus on performance, usability, the capability of an implementation to stand up under stress, or interoperability; nor does it focus on any implementation-specific details not formally required by the specification.

Content

The test suite comprises (i) this document, (ii) a set of test case files (a pair of input, and output per test case), and (iii) manifest files indicating which tests should be applied to which test files.

In this document XML namespaces are used as of defined in Table 1., below.

Table 1.: XML namespaces used in the RDFa Test Suite.
Prefix Namespace
rdfatc http://www.w3.org/2006/07/SWD/RDFa/testsuite/testcases/
test http://www.w3.org/2006/03/test-description#
dc http://purl.org/dc/elements/1.1/

2. Test Partitioning

The test cases defined in the RDFa Test Suite are separated regarding the according host language (HTML 4.01, XHTML 1.1, XHTML 2.0).

Host Language

As of the RDFa Terminology, a host language is a vocabulary that allows for embedding RDFa. The host languages covered by the RDFa Test Suite are summarised in Table 2..

Table 2.: RDFa Host Languages.

HTML 4.01 XHTML 1.1 XHTML 2.0
Specification http://www.w3.org/TR/html4/ http://www.w3.org/TR/xhtml11/ http://www.w3.org/TR/xhtml2/
Schema/DTD http://www.w3.org/MarkUp/DTD/html401-rdfa-1.dtd http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd TBD
MIME type text/html application/xhtml+xml application/xhtml+xml

For XHTML 1.1 and XHTML 2.0 the two following documents are relevant regarding modulariztaion (M12N):

Coverage

Each test case consists of an RDFa host language document, and a Conformancy Query that checks if the RDFa-generated RDF graph entails the according triples.

Note: An RDFa aware agent may produce triples not specified by the Conformance Query, which does not effect its conformancy.

3. Conformance

Document Conformance

Conformance To Syntax

A valid host language document is understood to be an RDFa document.

Conformance To Semantics

An RDF graph (cf. [RDF Concepts], Section 3.1) is said to be embedded in a host language document if the rules defined in the RDFa Syntax document are applied on the document yield an RDF graph satisfying the test assertions defined herein.

A test assertion, following the QA Glossary is a measurable or testable statement of behavior, action, or condition. The actual test assertion is realised through the utilisation of so called Conformance Queries (CQ) that, when executed on the resulting RDF graph, the answer MUST yield YES. The format of CQs is that of a SPARQL ASK query.

Conformance Of An RDFa Aware Agent

An RDFa aware agent processes a host language document, and generates an RDF graph by applying the RDFa extraction rules.

Note: The resulting RDF graph is not expected to include all possible features of the RDF Recommendation, e.g. reification and containers are not supported.

4. RDFa Tests

The test case structure is defined by the RDFa Test Metadata Schema, which in turn was derived from the W3C QA Testcase Metadata document. It has the following structure:

rdf:ID

dc:title

test:Purpose

test:specificationReference

test:reviewStatus

test:informationResourceInput

test:informationResourceResults

dc:contributor

Example

A sample test case (in N3 format) may look as follows. It tests, if an explicitly set xml:base correctly influences the generation of triples.

rdfatc:Test005 a  test:TestCase ;
               dc:title "xml:base" ;
               test:Purpose "Tests explicitly setting xml:base attribute." ;
               test:SpecificationReference "2.3";
               test:reviewStatus test:unreviewed ;
               test:informationResourceInput <http://www.w3.org/2006/07/SWD/RDFa/testsuite/testcases/000005.htm> ;
               test:informationResourceResults <http://www.w3.org/2006/07/SWD/RDFa/testsuite/testcases/000005.sparql> ;
               dc:contributor "Elias Torres" .	    
	

RDFa Test Assertions

The only normative source for the RDFa test assertions are the RDFa Test Manifest documents along with the according test case documents in the test case repository.

Table 3.: RDFa Test Cases Partitions.

HTML 4.01 XHTML 1.1 XHTML 2.0
Manifest HTML 4.01 TC Manifest XHTML 1.1 TC Manifest XHTML 2.0 TC Manifest
Test Cases HTML 4.01 Test Cases XHTML 1.1 Test Cases XHTML 2.0 Test Cases

Note: A human readable version of the RDF encoded test assertions is available by applying an XSL transformation onto it.

5. Manifest File

The RDFa Test Manifest files follow a Test Metadata Schema proposed by the former QA-WG (now QA-IG). Test Manifests instantiate the RDFa Test Metadata Schema. The Test Manifests contain metadata in RDF indicating the test type, and describing the test assertion in terms of specifying input and the expected output. The expected output is verified on basis of Conformance Queries as described above.

References

[HTML-WG]
HTML Working Group, see http://w3.org/MarkUp/Group/ .
[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]
RDFa in HTML Overview , Michael Hausenblas and Ben Adida, Editors, http://www.w3.org/2006/07/SWD/RDFa/ .
[RDF/XML Syntax]
RDF/XML Syntax Specification (Revised), Dave Beckett, Editor, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/ . Latest version available at http://www.w3.org/TR/rdf-syntax-grammar/ .
[RDF Concepts]
Resource Description Framework (RDF): Concepts and Abstract Syntax, Graham Klyne and Jeremy J. Carroll, Editors, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ . Latest version available at http://www.w3.org/TR/rdf-concepts/ .
[RDF Schema]
RDF Vocabulary Description Language 1.0: RDF Schema, Dan Brickley and R. V. Guha, Editors, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-schema-20040210/ . Latest version available at http://www.w3.org/TR/rdf-schema/ .
[RDF Semantics]
RDF Semantics, Patrick Hayes, Editor, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-mt-20040210/ . Latest version available at http://www.w3.org/TR/rdf-mt/ .
[XHTML 1.1]
XHTML 1.1 - Module-based XHTML, Murray Altheim and Shane McCarron, Editors, ??? http://www.w3.org/TR/xhtml11/ .

Acknowledgements

This document is the result of discussions within the RDF in HTML Task Force. The editors would like to thank Elias Torres for his fundamental work on setting up the first version of the test cases. Further, we like to thank Shane McCarron and Mark Birbeck for their permanent help on M12N and Schema/DTD issues.