W3C

RDF Test Cases

W3C Working Draft 10 October 2003

This Version:
http://www.w3.org/TR/2003/WD-rdf-testcases-20031010/
Latest Version:
http://www.w3.org/TR/rdf-testcases/
Previous Version:
http://www.w3.org/TR/2003/WD-rdf-testcases-20030905/
Editors:
Jan Grant, (ILRT, University of Bristol)
Dave Beckett, (ILRT, University of Bristol)
Series editor:
Brian McBride (Hewlett Packard Labs)

Abstract

This document describes the RDF Test Cases deliverable for the RDF Core Working Group as defined in the Working Group's Charter.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

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).

Detailed changes from the previous 05 September 2003 working draft and the 23 January 2003 last call working draft are described in the Changes section.

This document is in the Last Call review period, which ends on 07 November 2003. This Last Call publication consolidates changes and editorial improvements undertaken in response to feedback received during the previous Last Call publication of the RDFCore specifications which began on 23 January 2003. A list of the Last Call issues addressed by the Working Group is also available. This document has been endorsed by the RDF Core Working Group.

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/.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and 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. A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR/.

Table of Contents


1. Introduction

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 Working Group. 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 Working Group 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:

1.1. Scope

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.

1.2. RDF Errata

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.

2. Test Cases

The Test Case Repository [REPOSITORY] contains subdirectories, each containing test cases devoted to a single issue. Each directory contains a manifest file describing the tests in that directory. Where an issue originated with the RDF Issue Tracking process [ISSUES], the manifest will indicate this fact.

The Test Case Repository contains ZIP files of all Approved test cases [APPROVED] as well as a ZIP archive of all Approved and Not Approved test cases [FULLTESTS]

The Manifest file [MANIFEST] contains a machine-readable manifest of the test cases. The format of this file is described below.

2.1. Organization

The manifest file [MANIFEST] contains a machine-readable description of the test cases in RDF/XML. Care has been taken to ensure that this file follows a simple format to assist in machine-processing the test cases.

The file consists of a simple header [MANIFEST-HEAD], individual descriptions of the test cases, and a closing footer [MANIFEST-TAIL].

The test cases are divided into the following categories:

Positive Parser Tests
These tests consist of one (or more) input documents in RDF/XML as is revised in [RDF-SYNTAX]. The expected result is defined using the N-Triples syntax (Section 3). A parser is considered to pass the test if it produces a graph equivalent to the graph described by the N-triples output document, according to the definition of graph equivalence given in [RDF-CONCEPTS]. Where the input document(s) are legal RDF/XML, but a warning may be generated, this is indicated in the test manifest.
<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>
Negative Parser Tests
These tests consist of one input document. The document is not legal RDF/XML. A parser is considered to pass the test if it correctly holds the input document to be in error.
<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>
Positive Entailment Tests
These tests are specified by one or more premise documents (in RDF/XML or N-Triples) together with a single conclusion document. In addition, the rules used for determining entailment are specified by test:entailmentRules elements. If the following is present
 <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 be false in any interpretation (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.

Negative Entailment Tests
These tests are specified using a similar structure to the Positive Entailment Tests, with the <test:NegativeEntailmentTest> element used instead of the <test:PositiveEntailmentTest>. The test is failed if the conclusion can be drawn from the premises using the rules of RDF- or RDFS-entailment. The test is considered to be passed when it can be conclusively demonstrated that the conclusion cannot be so drawn. In practice, the test may be considered to be passed when a thorough attempt to fail the test is unable to achieve failure.
<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>
Datatype-aware entailment tests
Entailment test cases may, in addition, require datatype support. Such a requirement is indicated in the manifest by the presence of the following test:entailmentRules element, followed by zero or more test:datatypeSupport entries.
   <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:
Miscellaneous Tests
This manifest entry is used to describe test cases that do not fall into one of the earlier categories. It may have several associated files, indicated in <test:document> elements.
<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:

2.2. Approved Test Cases

The test cases in the following table have been approved.

There are 21 issues containing 158 approved test cases, and 57 test cases without an associated issue. Relative URLs listed in this table should be resolved against the base URI http://www.w3.org/2000/10/rdf-tests/rdfcore/
Test cases without an issue: 57 tests
Positive parser tests (test cases: 15)
Input filesOutput fileWarning?Approved
amp-in-url/test001.rdf amp-in-url/test001.nt RDFCore Telecon 2001-09-21
datatypes/test001.rdf datatypes/test001.nt RDFCore Telecon 2002-11-22
datatypes/test002.rdf datatypes/test002.nt RDFCore Telecon 2002-11-22
rdf-element-not-mandatory/test001.rdf rdf-element-not-mandatory/test001.nt RDFCore Telecon 2003-10-03
rdfms-reification-required/test001.rdf rdfms-reification-required/test001.nt RDFCore Telecon 2003-01-10
rdfms-uri-substructure/test001.rdf rdfms-uri-substructure/test001.nt RDFCore Telecon 2003-01-10
rdfms-xmllang/test001.rdf rdfms-xmllang/test001.nt RDFCore Telecon 2002-06-07
rdfms-xmllang/test002.rdf rdfms-xmllang/test002.nt RDFCore Telecon 2002-06-07
rdfms-xmllang/test003.rdf rdfms-xmllang/test003.nt RDFCore Telecon 2002-06-07
rdfms-xmllang/test004.rdf rdfms-xmllang/test004.nt RDFCore Telecon 2002-06-07
rdfms-xmllang/test005.rdf rdfms-xmllang/test005.nt RDFCore Telecon 2002-06-07
rdfms-xmllang/test006.rdf rdfms-xmllang/test006.nt RDFCore Telecon 2003-01-10
unrecognised-xml-attributes/test001.rdf unrecognised-xml-attributes/test001.nt RDFCore Telecon 2002-01-18
unrecognised-xml-attributes/test002.rdf unrecognised-xml-attributes/test002.nt RDFCore Telecon 2002-01-18
xml-canon/test001.rdf xml-canon/test001.nt RDFCore Telecon 2003-08-08
Negative parser tests (test cases: 9)
Input fileApproved
rdfms-abouteach/error001.rdfRDFCore Telecon 2003-01-10
rdfms-abouteach/error002.rdfRDFCore Telecon 2003-01-10
rdfms-rdf-id/error001.rdfRDFCore Telecon 2003-01-10
rdfms-rdf-id/error002.rdfRDFCore Telecon 2003-01-10
rdfms-rdf-id/error003.rdfRDFCore Telecon 2003-01-10
rdfms-rdf-id/error004.rdfRDFCore Telecon 2003-01-10
rdfms-rdf-id/error005.rdfRDFCore Telecon 2003-01-10
rdfms-rdf-id/error006.rdfRDFCore Telecon 2003-01-10
rdfms-rdf-id/error007.rdfRDFCore Telecon 2003-01-10
Positive Entailment tests (test cases: 16)
RulesPremise filesConclusion fileWarning?Approved
RDF + RDFS + DT(xsd:integer, xsd:string) datatypes-intensional/test002.ntFALSE RDFCore Telecon 2003-09-05
RDF + RDFS datatypes/test002.ntdatatypes/test002.nt RDFCore Telecon 2002-11-22
RDF + RDFS + DT(xsd:string) datatypes/test011a.ntdatatypes/test011b.nt RDFCore Telecon 2003-08-29
RDF + RDFS + DT(xsd:decimal, xsd:string) datatypes/test006.ntFALSE RDFCore Telecon 2003-01-10
RDF + DT(xsd:decimal, xsd:integer) datatypes/test005a.ntdatatypes/test005b.nt RDFCore Telecon 2003-01-10
RDF + DT(xsd:integer) datatypes/test003a.ntdatatypes/test003b.nt RDFCore Telecon 2002-11-22
RDF + DT(xsd:integer) datatypes/test003b.ntdatatypes/test003a.nt RDFCore Telecon 2002-11-22
Simpledatatypes/test008a.ntdatatypes/test008b.nt RDFCore Telecon 2002-10-11
RDF + RDFS + DT(rdf:XMLLiteral) datatypes/test010.ntFALSE RDFCore Telecon 2002-10-11
RDF + RDFS pfps-10/test001a.ntpfps-10/test001b.nt Editorial fix for issue PFPS-10
RDF + RDFS rdfms-seq-representation/empty.ntrdfms-seq-representation/test002.nt RDFCore Telecon 2003-01-10
RDF + RDFS rdfms-seq-representation/test003a.ntrdfms-seq-representation/test003b.nt RDFCore Telecon 2003-01-10
RDF + RDFS rdfms-seq-representation/empty.ntrdfms-seq-representation/test004.nt RDFCore Telecon 2003-01-10
RDF tex-01/test001.rdftex-01/test002.rdf RDFCore Telecon 2003-07-18
RDF tex-01/test002.rdftex-01/test001.rdf RDFCore Telecon 2003-07-18
RDF + RDFS + DT(xsd:int) xmlsch-02/test001.rdfxmlsch-02/test003.rdf RDFCore Telecon 2003-07-18
Negative Entailment tests (test cases: 16)
RulesPremise filesConclusion fileWarning?Approved
RDF + RDFS + DT(xsd:decimal, xsd:integer) datatypes-intensional/test001.ntFALSE RDFCore Telecon 2003-09-05
RDF + RDFS + DT(xsd:integer) datatypes/test002.ntdatatypes/test002b.nt RDFCore Telecon 2002-11-22
Simpledatatypes/test009a.ntdatatypes/test009b.nt RDFCore Telecon 2002-10-11
RDF + RDFS horst-01/test001.rdfhorst-01/test002.rdf RDFCore Telecon 2003-07-18
RDF + RDFS horst-01/test003.rdfhorst-01/test004.rdf RDFCore Telecon 2003-07-18
Simplerdfms-xmllang/test007a.ntrdfms-xmllang/test007b.nt RDFCore Telecon 2003-01-10
Simplerdfms-xmllang/test007b.ntrdfms-xmllang/test007c.nt RDFCore Telecon 2003-01-10
Simplerdfms-xmllang/test007c.ntrdfms-xmllang/test007a.nt RDFCore Telecon 2003-01-10
RDF + RDFS rdfs-container-membership-superProperty/not1P.rdfrdfs-container-membership-superProperty/not1C.rdf RDFCore Telecon 2003-01-10
RDF statement-entailment/test001a.ntstatement-entailment/test001b.nt RDFCore Telecon 2002-02-15
RDF statement-entailment/test002a.ntstatement-entailment/test002b.nt RDFCore Telecon 2002-02-15
RDF + RDFS statement-entailment/test001a.ntstatement-entailment/test001b.nt RDFCore Telecon 2002-02-15
RDF + RDFS statement-entailment/test002a.ntstatement-entailment/test002b.nt RDFCore Telecon 2002-02-15
RDF + RDFS + DT(xsd:int) xmlsch-02/test001.rdfxmlsch-02/test002.rdf RDFCore Telecon 2003-07-18
RDF + RDFS + DT(xsd:int) xmlsch-02/test002.rdfxmlsch-02/test001.rdf RDFCore Telecon 2003-07-18
RDF + RDFS + DT(xsd:int) xmlsch-02/test002.rdfxmlsch-02/test003.rdf RDFCore Telecon 2003-07-18
Miscellaneous tests (test cases: 1)
Related documentsApproved
rdfms-uri-substructure/error001.nt RDFCore Telecon 2003-01-10
Issue: rdf-charmod-literals has 3 tests
Positive parser tests (test cases: 1)
Input filesOutput fileWarning?Approved
rdf-charmod-literals/test001.rdf rdf-charmod-literals/test001.nt RDFCore Telecon 2002-04-05
Negative parser tests (test cases: 2)
Input fileApproved
rdf-charmod-literals/error001.rdfRDFCore Telecon 2002-04-05
rdf-charmod-literals/error002.rdfRDFCore Telecon 2002-04-05
Issue: rdf-charmod-uris has 4 tests
Positive parser tests (test cases: 2)
Input filesOutput fileWarning?Approved
rdf-charmod-uris/test001.rdf rdf-charmod-uris/test001.nt RDFCore Telecon 2002-04-26
rdf-charmod-uris/test002.rdf rdf-charmod-uris/test002.nt RDFCore Telecon 2002-04-26
Negative Entailment tests (test cases: 2)
RulesPremise filesConclusion fileWarning?Approved
RDF rdf-charmod-uris/test001.rdfrdf-charmod-uris/test002.rdf RDFCore Telecon 2002-04-26
RDF rdf-charmod-uris/test002.rdfrdf-charmod-uris/test001.rdf RDFCore Telecon 2002-04-26
Issue: rdf-containers-syntax-vs-schema has 9 tests
Positive parser tests (test cases: 7)
Input filesOutput fileWarning?Approved
rdf-containers-syntax-vs-schema/test001.rdf rdf-containers-syntax-vs-schema/test001.nt RDFCore Telecon 2001-06-29
rdf-containers-syntax-vs-schema/test002.rdf rdf-containers-syntax-vs-schema/test002.nt RDFCore Telecon 2001-06-29
rdf-containers-syntax-vs-schema/test003.rdf rdf-containers-syntax-vs-schema/test003.nt RDFCore Telecon 2001-06-29
rdf-containers-syntax-vs-schema/test004.rdf rdf-containers-syntax-vs-schema/test004.nt RDFCore Telecon 2001-06-29
rdf-containers-syntax-vs-schema/test006.rdf rdf-containers-syntax-vs-schema/test006.nt RDFCore Telecon 2001-06-29
rdf-containers-syntax-vs-schema/test007.rdf rdf-containers-syntax-vs-schema/test007.nt RDFCore Telecon 2001-06-29
rdf-containers-syntax-vs-schema/test008.rdf rdf-containers-syntax-vs-schema/test008.nt RDFCore Telecon 2001-06-29
Negative parser tests (test cases: 2)
Input fileApproved
rdf-containers-syntax-vs-schema/error001.rdfRDFCore Telecon 2001-06-29
rdf-containers-syntax-vs-schema/error002.rdfRDFCore Telecon 2001-11-30
Issue: rdf-ns-prefix-confusion has 11 tests
Positive parser tests (test cases: 11)
Input filesOutput fileWarning?Approved
rdf-ns-prefix-confusion/test0001.rdf rdf-ns-prefix-confusion/test0001.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0003.rdf rdf-ns-prefix-confusion/test0003.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0004.rdf rdf-ns-prefix-confusion/test0004.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0005.rdf rdf-ns-prefix-confusion/test0005.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0006.rdf rdf-ns-prefix-confusion/test0006.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0009.rdf rdf-ns-prefix-confusion/test0009.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0010.rdf rdf-ns-prefix-confusion/test0010.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0011.rdf rdf-ns-prefix-confusion/test0011.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0012.rdf rdf-ns-prefix-confusion/test0012.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0013.rdf rdf-ns-prefix-confusion/test0013.nt RDFCore Telecon 2001-05-25
rdf-ns-prefix-confusion/test0014.rdf rdf-ns-prefix-confusion/test0014.nt RDFCore Telecon 2001-05-25
Issue: rdfms-difference-between-ID-and-about has 4 tests
Positive parser tests (test cases: 3)
Input filesOutput fileWarning?Approved
rdfms-difference-between-ID-and-about/test1.rdf rdfms-difference-between-ID-and-about/test1.nt RDFCore Telecon 2001-12-14
rdfms-difference-between-ID-and-about/test2.rdf rdfms-difference-between-ID-and-about/test2.nt RDFCore Telecon 2003-01-10
rdfms-difference-between-ID-and-about/test3.rdf rdfms-difference-between-ID-and-about/test3.nt RDFCore Telecon 2003-01-10
Negative parser tests (test cases: 1)
Input fileApproved
rdfms-difference-between-ID-and-about/error1.rdfRDFCore Telecon 2001-12-14
Issue: rdfms-duplicate-member-props has 1 tests
Positive parser tests (test cases: 1)
Input filesOutput fileWarning?Approved
rdfms-duplicate-member-props/test001.rdf rdfms-duplicate-member-props/test001.nt RDFCore Telecon 2002-05-03
Issue: rdfms-empty-property-elements has 20 tests
Positive parser tests (test cases: 17)
Input filesOutput fileWarning?Approved
rdfms-empty-property-elements/test001.rdf rdfms-empty-property-elements/test001.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test002.rdf rdfms-empty-property-elements/test002.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test003.rdf rdfms-empty-property-elements/test003.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test004.rdf rdfms-empty-property-elements/test004.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test005.rdf rdfms-empty-property-elements/test005.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test006.rdf rdfms-empty-property-elements/test006.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test007.rdf rdfms-empty-property-elements/test007.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test008.rdf rdfms-empty-property-elements/test008.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test009.rdf rdfms-empty-property-elements/test009.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test010.rdf rdfms-empty-property-elements/test010.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test011.rdf rdfms-empty-property-elements/test011.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test012.rdf rdfms-empty-property-elements/test012.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test013.rdf rdfms-empty-property-elements/test013.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test014.rdf rdfms-empty-property-elements/test014.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test015.rdf rdfms-empty-property-elements/test015.nt RDFCore Telecon 2001-05-25
rdfms-empty-property-elements/test016.rdf rdfms-empty-property-elements/test016.nt RDFCore Telecon 2003-01-10
rdfms-empty-property-elements/test017.rdf rdfms-empty-property-elements/test017.nt RDFCore Telecon 2003-01-10
Negative parser tests (test cases: 3)
Input fileApproved
rdfms-empty-property-elements/error001.rdfRDFCore Telecon 2001-05-25
rdfms-empty-property-elements/error002.rdfRDFCore Telecon 2001-05-25
rdfms-empty-property-elements/error003.rdfRDFCore Telecon 2001-05-25
Issue: rdfms-identity-anon-resources has 5 tests
Positive parser tests (test cases: 5)
Input filesOutput fileWarning?Approved
rdfms-identity-anon-resources/test001.rdf rdfms-identity-anon-resources/test001.nt RDFCore Telecon 2001-10-19
rdfms-identity-anon-resources/test002.rdf rdfms-identity-anon-resources/test002.nt RDFCore Telecon 2001-10-19
rdfms-identity-anon-resources/test003.rdf rdfms-identity-anon-resources/test003.nt RDFCore Telecon 2001-10-19
rdfms-identity-anon-resources/test004.rdf rdfms-identity-anon-resources/test004.nt RDFCore Telecon 2001-10-19
rdfms-identity-anon-resources/test005.rdf rdfms-identity-anon-resources/test005.nt RDFCore Telecon 2001-10-19
Issue: rdfms-not-id-and-resource-attr has 4 tests
Positive parser tests (test cases: 4)
Input filesOutput fileWarning?Approved
rdfms-not-id-and-resource-attr/test001.rdf rdfms-not-id-and-resource-attr/test001.nt RDFCore Telecon 2002-03-15
rdfms-not-id-and-resource-attr/test002.rdf rdfms-not-id-and-resource-attr/test002.nt RDFCore Telecon 2002-03-15
rdfms-not-id-and-resource-attr/test004.rdf rdfms-not-id-and-resource-attr/test004.nt RDFCore Telecon 2002-03-15
rdfms-not-id-and-resource-attr/test005.rdf rdfms-not-id-and-resource-attr/test005.nt RDFCore Telecon 2002-03-15
Issue: rdfms-para196 has 1 tests
Positive parser tests (test cases: 1)
Input filesOutput fileWarning?Approved
rdfms-para196/test001.rdf rdfms-para196/test001.nt RDFCore Telecon 2002-01-11
Issue: rdfms-rdf-names-use has 60 tests
Positive parser tests (test cases: 40)
Input filesOutput fileWarning?Approved
rdfms-rdf-names-use/test-001.rdf rdfms-rdf-names-use/test-001.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-002.rdf rdfms-rdf-names-use/test-002.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-003.rdf rdfms-rdf-names-use/test-003.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-004.rdf rdfms-rdf-names-use/test-004.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-005.rdf rdfms-rdf-names-use/test-005.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-006.rdf rdfms-rdf-names-use/test-006.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-007.rdf rdfms-rdf-names-use/test-007.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-008.rdf rdfms-rdf-names-use/test-008.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-009.rdf rdfms-rdf-names-use/test-009.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-010.rdf rdfms-rdf-names-use/test-010.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-011.rdf rdfms-rdf-names-use/test-011.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-012.rdf rdfms-rdf-names-use/test-012.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-013.rdf rdfms-rdf-names-use/test-013.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-014.rdf rdfms-rdf-names-use/test-014.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-015.rdf rdfms-rdf-names-use/test-015.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-016.rdf rdfms-rdf-names-use/test-016.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-017.rdf rdfms-rdf-names-use/test-017.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-018.rdf rdfms-rdf-names-use/test-018.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-019.rdf rdfms-rdf-names-use/test-019.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-020.rdf rdfms-rdf-names-use/test-020.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-021.rdf rdfms-rdf-names-use/test-021.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-022.rdf rdfms-rdf-names-use/test-022.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-023.rdf rdfms-rdf-names-use/test-023.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-024.rdf rdfms-rdf-names-use/test-024.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-025.rdf rdfms-rdf-names-use/test-025.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-026.rdf rdfms-rdf-names-use/test-026.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-027.rdf rdfms-rdf-names-use/test-027.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-028.rdf rdfms-rdf-names-use/test-028.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-029.rdf rdfms-rdf-names-use/test-029.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-030.rdf rdfms-rdf-names-use/test-030.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-031.rdf rdfms-rdf-names-use/test-031.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-032.rdf rdfms-rdf-names-use/test-032.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-033.rdf rdfms-rdf-names-use/test-033.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-034.rdf rdfms-rdf-names-use/test-034.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-035.rdf rdfms-rdf-names-use/test-035.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-036.rdf rdfms-rdf-names-use/test-036.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/test-037.rdf rdfms-rdf-names-use/test-037.nt RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/warn-001.rdf rdfms-rdf-names-use/warn-001.nt allowed with warnings RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/warn-002.rdf rdfms-rdf-names-use/warn-002.nt allowed with warnings RDFCore Telecon 2001-11-30
rdfms-rdf-names-use/warn-003.rdf rdfms-rdf-names-use/warn-003.nt allowed with warnings RDFCore Telecon 2001-11-30
Negative parser tests (test cases: 20)
Input fileApproved
rdfms-rdf-names-use/error-001.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-002.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-003.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-004.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-005.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-006.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-007.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-008.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-009.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-010.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-011.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-012.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-013.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-014.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-015.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-016.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-017.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-018.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-019.rdfRDFCore Telecon 2001-11-30
rdfms-rdf-names-use/error-020.rdfRDFCore Telecon 2001-11-30
Issue: rdfms-seq-representation has 1 tests
Positive parser tests (test cases: 1)
Input filesOutput fileWarning?Approved
rdfms-seq-representation/test001.rdf rdfms-seq-representation/test001.nt RDFCore Telecon 2002-05-31
Issue: rdfms-syntax-incomplete has 10 tests
Positive parser tests (test cases: 4)
Input filesOutput fileWarning?Approved
rdfms-syntax-incomplete/test001.rdf rdfms-syntax-incomplete/test001.nt RDFCore Telecon 2003-01-10
rdfms-syntax-incomplete/test002.rdf rdfms-syntax-incomplete/test002.nt RDFCore Telecon 2003-01-10
rdfms-syntax-incomplete/test003.rdf rdfms-syntax-incomplete/test003.nt RDFCore Telecon 2003-01-10
rdfms-syntax-incomplete/test004.rdf rdfms-syntax-incomplete/test004.nt RDFCore Telecon 2003-01-10
Negative parser tests (test cases: 6)
Input fileApproved
rdfms-syntax-incomplete/error001.rdfRDFCore Telecon 2003-01-10
rdfms-syntax-incomplete/error002.rdfRDFCore Telecon 2003-01-10
rdfms-syntax-incomplete/error003.rdfRDFCore Telecon 2003-01-10
rdfms-syntax-incomplete/error004.rdfRDFCore Telecon 2003-01-10
rdfms-syntax-incomplete/error005.rdfRDFCore Telecon 2003-01-10
rdfms-syntax-incomplete/error006.rdfRDFCore Telecon 2003-01-10
Issue: rdfms-xml-base has 13 tests
Positive parser tests (test cases: 13)
Input filesOutput fileWarning?Approved
xmlbase/test001.rdf xmlbase/test001.nt RDFCore Telecon 2002-03-15
xmlbase/test002.rdf xmlbase/test002.nt RDFCore Telecon 2002-03-15
xmlbase/test003.rdf xmlbase/test003.nt RDFCore Telecon 2002-03-15
xmlbase/test004.rdf xmlbase/test004.nt RDFCore Telecon 2002-03-15
xmlbase/test006.rdf xmlbase/test006.nt RDFCore Telecon 2002-03-15
xmlbase/test007.rdf xmlbase/test007.nt RDFCore Telecon 2002-03-15
xmlbase/test008.rdf xmlbase/test008.nt RDFCore Telecon 2002-03-15
xmlbase/test009.rdf xmlbase/test009.nt RDFCore Telecon 2002-03-15
xmlbase/test010.rdf xmlbase/test010.nt RDFCore Telecon 2002-03-15
xmlbase/test011.rdf xmlbase/test011.nt RDFCore Telecon 2002-03-15
xmlbase/test012.rdf xmlbase/test012.nt RDFCore Telecon 2002-03-15
xmlbase/test013.rdf xmlbase/test013.nt RDFCore Telecon 2002-03-15
xmlbase/test014.rdf xmlbase/test014.nt RDFCore Telecon 2002-03-15
Issue: rdfms-xml-literal-namespaces has 2 tests
Positive parser tests (test cases: 2)
Input filesOutput fileWarning?Approved
rdfms-xml-literal-namespaces/test001.rdf rdfms-xml-literal-namespaces/test001.nt RDFCore Telecon 2003-01-10
rdfms-xml-literal-namespaces/test002.rdf rdfms-xml-literal-namespaces/test002.nt RDFCore Telecon 2003-01-10
Issue: rdfs-domain-and-range has 4 tests
Positive parser tests (test cases: 2)
Input filesOutput fileWarning?Approved
rdfs-domain-and-range/test001.rdf rdfs-domain-and-range/test001.nt RDFCore Telecon 2001-10-19
rdfs-domain-and-range/test002.rdf rdfs-domain-and-range/test002.nt RDFCore Telecon 2001-10-19
Negative Entailment tests (test cases: 2)
RulesPremise filesConclusion fileWarning?Approved
RDF + RDFS rdfs-domain-and-range/premises006.rdfrdfs-domain-and-range/nonconclusions006.rdf RDFCore Telecon 2003-01-10
RDF + RDFS rdfs-domain-and-range/premises005.rdfrdfs-domain-and-range/nonconclusions005.rdf RDFCore Telecon 2003-01-10
Issue: rdfs-no-cycles-in-subClassOf has 1 tests
Positive Entailment tests (test cases: 1)
RulesPremise filesConclusion fileWarning?Approved
RDF + RDFS rdfs-no-cycles-in-subClassOf/test001.rdfrdfs-no-cycles-in-subClassOf/test001.nt RDFCore Telecon 2001-10-12
Issue: rdfs-no-cycles-in-subPropertyOf has 1 tests
Positive Entailment tests (test cases: 1)
RulesPremise filesConclusion fileWarning?Approved
RDF + RDFS rdfs-no-cycles-in-subPropertyOf/test001.rdfrdfs-no-cycles-in-subPropertyOf/test001.nt RDFCore Telecon 2001-10-12
Issue: rdfs-subClassOf-a-Property has 1 tests
Negative Entailment tests (test cases: 1)
RulesPremise filesConclusion fileWarning?Approved
RDF + RDFS rdfs-subClassOf-a-Property/test001.ntFALSE RDFCore Telecon 2003-01-10
Issue: rdfs-subPropertyOf-semantics has 1 tests
Positive Entailment tests (test cases: 1)
RulesPremise filesConclusion fileWarning?Approved
RDF + RDFS rdfs-subPropertyOf-semantics/test001.ntrdfs-subPropertyOf-semantics/test002.nt RDFCore Telecon 2003-01-10
Issue: I5.24-IF-or-IFF-property-properties has 2 tests
Negative Entailment tests (test cases: 2)
RulesPremise filesConclusion fileWarning?Approved
RDF + RDFS rdfs-domain-and-range/premises006.rdfrdfs-domain-and-range/nonconclusions006.rdf RDFCore Telecon 2003-01-10
RDF + RDFS rdfs-domain-and-range/premises005.rdfrdfs-domain-and-range/nonconclusions005.rdf RDFCore Telecon 2003-01-10

2.3. Test Cases Not Approved

The test case repository contains test cases that have not been approved. Such test cases are not enumerated in this document but a list of them is available at http://www.w3.org/2000/10/rdf-tests/rdfcore/allTestCases.html.

2.4. Running the Test Cases

The test case manifest format was deliberately chosen to be a simple, declarative description of the test cases. Parser tests can be run in conjunction with simple tools such as ntc[NTC]. A parser should pass all the positive parser tests, and reject all the negative parser tests. Tools like Euler [EULER] have been used to run the entailment tests.

Due to the rules of entailment tests, a positive or negative entailment test case with an empty conclusion document can be used to illustrate semantic constraints associated with sets of entailment rules.

The test cases have been created to illustrate the resolution of particular issues on the RDF Issue Tracking list. Consequently, test case results should always be interpreted in conjunction with the resolution of the associated issue and the description (if any) attached to the test case in the manifest.

3. N-Triples

N-Triples is a line-based, plain text format for encoding an RDF graph. It was designed to be a fixed subset of N3[N3] [N3-Primer] and hence N3 tools such as cwm [CWM], n-triples2kif [N-TRIPLES2KIF], and Euler [EULER] can be used to read and process it. cwm can output this format when invoked as "cwm -ntriples".

It is recommended, but not required, that N-Triples content is stored in files with an '.nt' suffix to distinguish them from N3.

The Internet media type / MIME type of N-Triples is text/plain and the character encoding is 7-bit US-ASCII.

NOTE: N-Triples is an RDF syntax for expressing RDF test cases and defining the correspondence between RDF/XML and the RDF abstract syntax. RDF/XML [RDF-SYNTAX] is the recommended syntax for applications to exchange RDF information.

3.1. Extended Backus-Naur Form (EBNF) Grammar

An N-Triples document is a sequence of US-ASCII characters and is defined by the ntripleDoc grammar term below. Parsing it results in a sequence of RDF triples formed from the subject, predicate and object productions.

This EBNF is