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 $
Copyright © 2007 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
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.
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.
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.
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.
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.
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/ |
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).
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..
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):
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.
A valid host language document is understood to be an RDFa document.
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.
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.
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" .
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.
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.
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.
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.