Copyright © 2003 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
This document describes the RDF Test Cases deliverable for the RDF Core Working Group as defined in the WG's Charter.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C.
This is a W3C Last Call Working Draft of the RDF Core Working Group and has been produced as part of the W3C Semantic Web Activity (Activity Statement).
This document is in the Last Call review period, which ends on 21 February 2003. This document has been endorsed by the RDF Core Working Group.
This version includes the N-Triples language definition. The working group has approved the remaining test cases. The test case repository will be updated in the light of feedback from this draft. Detailed changes are recorded in Appendix A: ChangeLog.
This document is being released for review by W3C Members and other interested parties to encourage feedback and comments, especially with regard to how the changes made affect existing implementations and content.
In conformance with W3C policy requirements, known patent and IPR constraints associated with this Working Draft are detailed on the RDF Core Working Group Patent Disclosure page.
Comments on this document are invited and should be sent to the public mailing list www-rdf-comments@w3.org. An archive of comments is available at http://lists.w3.org/Archives/Public/www-rdf-comments/.
This is a public W3C Last Call Working Draft for review by W3C Members and other interested parties. This section describes the status of this document at the time of its publication. It is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite as other than "work in progress". A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR/.
One of the deliverables specified in Charter of the RDF Core Working Group is: a set of machine-processable test cases corresponding to technical issues addressed by the WG. This document describes the test cases that fulfill that deliverable but it does not contain the test cases themselves. The test cases are available at http://www.w3.org/2000/10/rdf-tests/rdfcore/.
The RDF Interest Group and other members of the RDF community have identified issues/ambiguities in the [RDFMS] Specification and the [RDF-SCHEMA] Candidate Recommendation. These issues have been collected and categorized in the RDF Core WG Issue Tracking document. The RDF Core Working Group uses this issue list to guide its work. The issues list is a working document; it is updated as new issues are identified. It is updated as the Working Group makes decisions as documented in the Attention Developers section of the document.
The complete specification of RDF consists of a number of documents:
A comprehensive and complete test suite for RDF should cover all of the rules in the Formal Grammar for RDF. The Working Group, however, is not chartered to deliver such a test suite but rather to create test cases for the issues the Working Group addresses (when applicable). Although the Working Group will not create test cases for some grammar rules (e.g. rule [6.1]), if such test cases are donated to the W3C the Consortium may add such test cases to this set of test cases.
The RDF Errata documents known errors in [RDFMS]. Since errata are considered normative changes to a W3C Specification and Working Group decisions are not normative until a specification is a W3C Recommendation, none of the decisions made by the RDF Core Working Group have (to date) been reflected in the errata.
The Test Case Repository is located at http://www.w3.org/2000/10/rdf-tests/rdfcore/. Each directory in the repository is devoted to a single issue. Most directories have a name that is identical to the related issue in the RDF Issue Tracking document. For example, the directory rdf-ns-prefix-confusion is identical to the rdf-ns-prefix-confusion issue. In the other cases, the directory does not have an associated issue in the issue list (e.g. amp-in-url). If a directory is empty, then no test cases have been created for the issue.
The Test Case Repository contains ZIP files of all Approved test cases in approved_20030117.zip ( latest version) as well as Zip files of all Approved and Not Approved test cases in all_20030117.zip (latest version).
The file http://www.w3.org/2000/10/rdf-tests/rdfcore/Manifest.rdf contains a machine-readable manifest of the test cases. The Manifest.rdf format is described below.
The file http://www.w3.org/2000/10/rdf-tests/rdfcore/Manifest.rdf contains a machine-readable description of the test cases in RDF/XML. Care has been taken to ensure that the Manifest.rdf file follows a simple format to assist in machine-processing the test cases.
The file consists of a simple header (see http://www.w3.org/2000/10/rdf-tests/rdfcore/skeleton/manifestHead.rdf), individual descriptions of the test cases, and a closing footer ( http://www.w3.org/2000/10/rdf-tests/rdfcore/skeleton/manifestTail.rdf).
The test cases are divided into the following categories:
<test:PositiveParserTest rdf:about="http://w3.example.org/test001">
<test:issue rdf:resource="http://w3.example.org/rdf-tracking/#example1" />
<test:status>APPROVED</test:status>
<test:approval rdf:resource="http://rdfcore.example.org/archives/001.html" />
<test:description>
This is a simple positive parser test example.
</test:description>
<test:inputDocument>
<test:RDF-XML-Document rdf:about="http://w3.example.org/test001.rdf" />
</test:inputDocument>
<test:outputDocument>
<test:NT-Document rdf:about="http://w3.example.org/test001.nt" />
</test:outputDocument>
<test:warning>Some parsers may produce a warning when running this test</test:warning>
</test:PositiveParserTest>
<test:NegativeParserTest rdf:about="http://w3.example.org/error001">
<test:issue rdf:resource="http://w3.example.org/rdf-tracking/#example1" />
<test:status>APPROVED</test:status>
<test:inputDocument>
<test:RDF-XML-Document rdf:about="http://w3.example.org/error001.rdf" />
</test:inputDocument>
</test:NegativeParserTest>
<test:entailmentRules rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />then the test succeeds if the entailment holds according to the rules of RDF-entailment as specified in [RDF-SEMANTICS]. If the following two elements are present
<test:entailmentRules rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
<test:entailmentRules rdf:resource="http://www.w3.org/2000/01/rdf-schema#" />
then the test succeeds if the entailment holds according to the
rules of RDFS-entailment as specified in [RDF-SEMANTICS].
<test:PositiveEntailmentTest rdf:about="http://w3.example.org/rdfs-domain-and-range/conjunction-test">
<test:description>
This test demonstrates the conjunctive nature of range and domain.
</test:description>
<test:entailmentRules rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
<test:entailmentRules rdf:resource="http://www.w3.org/2000/01/rdf-schema#" />
<test:premiseDocument>
<test:NT-Document rdf:about="http://w3.example.org/rdfs-domain-and-range/test001.nt" />
</test:premiseDocument>
<test:premiseDocument>
<test:NT-Document rdf:about="http://w3.example.org/rdfs-domain-and-range/test002.nt" />
</test:premiseDocument>
<test:premiseDocument>
<test:NT-Document rdf:about="http://w3.example.org/rdfs-domain-and-range/test003.nt" />
</test:premiseDocument>
<test:conclusionDocument>
<test:NT-Document rdf:about="http://w3.example.org/rdfs-domain-and-range/test004.nt" />
</test:conclusionDocument>
</test:PositiveEntailmentTest>
According to [RDF-SEMANTICS], a premise document that contains a semantic error with respect to any constraints imposed by the entailment rules selected will come out false (and hence entail anything).
Support for such situations is provided by the manifest format by declaring an premise or conclusion pseudo-document as follows:
<test:conclusionDocument>
<test:False-Document/>
</test:conclusionDocument>
By convention, such a pseudo-document is said to come out false under any interpretation.
<test:NegativeEntailmentTest rdf:about="http://w3.example.org/statement-entailment/test001">
<test:status>PENDING</test:status>
<test:approval rdf:resource="http://rdfcore.example.org/Archives/Public/w3c-rdfcore-wg/2002Feb/0476.html" />
<test:description>
RDF Core WG RESOLVED that a reified statement was a stating, not a statement.
The following entailment does not, therefore, hold.
</test:description>
<test:entailmentRules rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
<test:entailmentRules rdf:resource="http://www.w3.org/2000/01/rdf-schema#" />
<test:premiseDocument>
<test:NT-Document rdf:about="http://w3.example.org/statement-entailment/test001a.nt" />
</test:premiseDocument>
<test:conclusionDocument>
<test:NT-Document rdf:about="http://w3.example.org/statement-entailment/test001b.nt" />
</test:conclusionDocument>
</test:NegativeEntailmentTest>
<test:entailmentRules rdf:resource="http://www.w3.org/2000/10/rdf-tests/rdfcore/datatypes#" /> <test:datatypeSupport rdf:resource="http://www.w3.org/2001/XMLSchema#integer" /> <test:datatypeSupport rdf:resource="http://dt.example.org/datatype#foo" />For the purposes of the test suite, if a test case requires datatype support for a set of datatypes, { T, U, V, ... } then the following three pieces of machinery are required:
<test:MiscellaneousTest rdf:about="http://w3.example.org/misc001">
<test:status>PENDING</test:status>
<test:description>
A serializer asked to output the graph described in the test001
document should raise an exception since it cannot be described using
RDF/XML.
</test:description>
<test:document>
<test:NT-Document rdf:about="http://w3.example.org/nonserializable/test001.nt" />
</test:document>
</test:MiscellaneousTest>
In addition, each test case description may have the following common attributes:
<test:issue rdf:resource="http://www.w3.org/2000/03/rdf-tracking/#rdfs-no-cycles-in-subClassOf" />
<test:status>APPROVED</test:status>
<test:approval rdf:resource="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Feb/0476.html" />
<test:discussion rdf:resource="http://rdfcore.example.org/" />
<test:description>
Text describing the test case goes here.
</test:description>
<test:warning> Text describing the warning goes here. </test:warning>
The test cases in the following table have been approved.