W3C

RDF 1.2 XML Evaluation Tests

Copyright © 2004-2026 World Wide Web Consortium. W3C® liability, trademark and permissive document license rules apply.


Abstract

This page describes W3C RDF & SPARQL Working Group's test suite for RDF 1.2. Conformance for RDF 1.2 requires conforming with tests in this test suite along with the relevant RDF 1.1 tests.

Contributing Tests

The test manifests and entries are built automatically from manifest.ttl using a Rake task. Tests may be contributed via pull request to https://github.com/w3c/rdf-tests with suitable changes to the manifest.ttl and referenced files.

Distribution

Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License. To contribute to a W3C Test Suite, see the policies and contribution forms.

Disclaimer

UNDER BOTH MUTUALLY EXCLUSIVE LICENSES, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

Test Descriptions

rdf12-xml-dir-01: rdf12-xml-dir-01

Language with direction

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-dir-01.rdf
result
rdf12-xml-dir-01.nt
rdf12-xml-dir-02: rdf12-xml-dir-02

Language with direction and no RDF version

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-dir-02.rdf
result
rdf12-xml-dir-02.nt
rdf12-xml-dir-03: rdf12-xml-dir-03

Language with direction and no ITS version

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-dir-03.rdf
result
rdf12-xml-dir-03.nt
rdf12-xml-dir-04: rdf12-xml-dir-04

Language with direction on element directly

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-dir-04.rdf
result
rdf12-xml-dir-04.nt
rdf12-xml-dir-05: rdf12-xml-dir-05

Language with version and direction on element directly

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-dir-05.rdf
result
rdf12-xml-dir-05.nt
rdf12-xml-dir-06: rdf12-xml-dir-06

Direction with no language

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-dir-06.rdf
result
rdf12-xml-dir-06.nt
rdf12-xml-tt-01: rdf12-xml-tt-01

Ignored triple term

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-tt-01.rdf
result
rdf12-xml-tt-01.nt
rdf12-xml-tt-02: rdf12-xml-tt-02

Triple term having IRI subject

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-tt-02.rdf
result
rdf12-xml-tt-02.nt
rdf12-xml-tt-03: rdf12-xml-tt-03

Triple term having BNode subject

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-tt-03.rdf
result
rdf12-xml-tt-03.nt
rdf12-xml-tt-04: rdf12-xml-tt-04

Triple term having a type

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-tt-04.rdf
result
rdf12-xml-tt-04.nt
rdf12-xml-tt-05: rdf12-xml-tt-05

Triple term having BNode object

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-tt-05.rdf
result
rdf12-xml-tt-05.nt
rdf12-xml-tt-06: rdf12-xml-tt-06

Recursive triple term

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-tt-06.rdf
result
rdf12-xml-tt-06.nt
rdf12-xml-tt-07: rdf12-xml-tt-07

Invalid triple term having no predicate or object

type
rdft:TestXMLNegativeSyntax
approval
references
(1)
action
rdf12-xml-tt-07.rdf
rdf12-xml-tt-08: rdf12-xml-tt-08

Invalid triple term having two objects

type
rdft:TestXMLNegativeSyntax
approval
references
(1)
action
rdf12-xml-tt-08.rdf
rdf12-xml-an-01: rdf12-xml-an-01

On literal with IRI reifier

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-01.rdf
result
rdf12-xml-an-01.nt
rdf12-xml-an-02: rdf12-xml-an-02

On literal with BNode reifier

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-02.rdf
result
rdf12-xml-an-02.nt
rdf12-xml-an-03: rdf12-xml-an-03

On literal with IRI reifier and annotations

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-03.rdf
result
rdf12-xml-an-03.nt
rdf12-xml-an-04: rdf12-xml-an-04

An empty property element just gives an empty literal. Annotate the statement at the same time. (See rdfms-empty-property-elements-test005 in 1.1 test suite)

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-04.rdf
result
rdf12-xml-an-04.nt
rdf12-xml-an-05: rdf12-xml-an-05

Here the parseType indicates that we should create a resource. We annotate the statement at the same time. (See rdfms-empty-property-elements-test006 in 1.1 test suite)

type
rdft:TestXMLEval
approval
references
(1 2)
action
rdf12-xml-an-05.rdf
result
rdf12-xml-an-05.nt
rdf12-xml-an-06: rdf12-xml-an-06

rdf:annotation on an empty property element indicates reification. (See rdfms-not-id-and-resource-attr-test001 in 1.1 test suite)

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-06.rdf
result
rdf12-xml-an-06.nt
rdf12-xml-an-07: rdf12-xml-an-07

Node with annotation having a type

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-07.rdf
result
rdf12-xml-an-07.nt
rdf12-xml-an-08: rdf12-xml-an-08

Node with annotation having an IRI value

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-08.rdf
result
rdf12-xml-an-08.nt
rdf12-xml-an-09: rdf12-xml-an-09

Node with annotation having an BNode value

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-09.rdf
result
rdf12-xml-an-09.nt
rdf12-xml-an-10: rdf12-xml-an-10

Node with recursive annotation

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-10.rdf
result
rdf12-xml-an-10.nt
rdf12-xml-an-11: rdf12-xml-an-11

rdf:annotation and rdf:resource are allowed together on empty property element.

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-11.rdf
result
rdf12-xml-an-11.nt
rdf12-xml-an-12: rdf12-xml-an-12

rdf:annotationNodeID and rdf:resource are allowed together on empty property element.

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-12.rdf
result
rdf12-xml-an-12.nt
rdf12-xml-an-13: rdf12-xml-an-13

rdf:annotation and parseType="Literal".

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-13.rdf
result
rdf12-xml-an-13.nt
rdf12-xml-an-14: rdf12-xml-an-14

rdf:annotationNodeID and parseType="Literal".

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-14.rdf
result
rdf12-xml-an-14.nt
rdf12-xml-an-15: rdf12-xml-an-15

rdf:annotation and parseType="Collection".

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-15.rdf
result
rdf12-xml-an-15.nt
rdf12-xml-an-16: rdf12-xml-an-16

rdf:annotationNodeID and parseType="Collection".

type
rdft:TestXMLEval
approval
references
(1)
action
rdf12-xml-an-16.rdf
result
rdf12-xml-an-16.nt
rdf12-xml-an-reif-01: rdf12-xml-an-reif-01.rdf

RDF 1.1 reification and RDF 1.2 annotation

type
rdft:TestXMLEval
approval
action
rdf12-xml-an-reif-01.rdf
result
rdf12-xml-an-reif-01.nt