Copyright © 2004-2023 World Wide Web Consortium. W3C® liability, trademark and permissive document license rules apply.
This page describes W3C RDF 1.1 Working Group's test suite.
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.
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.
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.
Description: the purpose of this test case is to show how one of XML's Predefined Entities - in this case the ampersand - is represented when it is used in the value of an rdf:about attribute. The ampersand is represented by its numeric character reference as specified in: http://www.w3.org/TR/REC-xml#sec-predefined-ent In the associated N-Triples file, the ampersand will be represented with a single ampersand character (and not the ampersand's numeric character reference). Note: when a XML/HTML browser is used to display this file, a single ampersand character may be displayed and not the ampersand's numeric character reference. In this case, the browser may provide an alternate way to view the file (such as viewing the file's source or saving to a file).
A simple datatype production; a language+datatype production.
A parser is not required to know about well-formed datatyped literals.
Does the treatment of literals conform to charmod ? Test for success of legal Normal Form C literal
A uriref is allowed to match non-US ASCII forms conforming to Unicode Normal Form C. No escaping algorithm is applied.
A uriref which already has % escaping is permitted. No unescaping algorithm is applied.
rdf:li is not allowed as as an attribute
rdf:li elements as typed nodes - a bizarre case As specified in http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Nov/0651.html is not an error.
Simple container
rdf:li is unaffected by other rdf:_nnn properties. This test case is concerned only with defining the triples that this particular example RDF/XML represents. It is not concerned with whether that collection of triples violates any other constraints, e.g. restrictions on the number of rdf:_1 properties that may be defined for a resource.
rdf:li elements can exist in any description element
rdf:li elements match any of the property element productions
containers match the typed node production
rdf:li processing within each element is independent
rdf:li processing is per element, not per resource.
A surrounding rdf:RDF element is no longer mandatory.
RDF attributes that are required to have an rdf: prefix about aboutEach ID bagID type resource parseType
RDF attributes that are required to have an rdf: prefix about aboutEach ID bagID type resource parseType
RDF attributes that are required to have an rdf: prefix about aboutEach ID bagID type resource parseType
RDF attributes that are required to have an rdf: prefix about aboutEach ID bagID type resource parseType
RDF attributes that are required to have an rdf: prefix about aboutEach ID bagID type resource parseType
Namespace qualification MUST be used for all property attributes.
Non-prefixed RDF elements (NOT attributes) are allowed when a default XML element namespace is defined with an xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" attribute.
Non-prefixed RDF elements (NOT attributes) are allowed when a default XML element namespace is defined with an xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" attribute.
Non-prefixed RDF elements (NOT attributes) are allowed when a default XML element namespace is defined with an xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" attribute.
Non-prefixed RDF elements (NOT attributes) are allowed when a default XML element namespace is defined with an xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" attribute.
Non-prefixed RDF elements (NOT attributes) are allowed when a default XML element namespace is defined with an xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" attribute.
aboutEach removed from the RDF specifications. See URI above for further details.
aboutEach removed from the RDF specifications. See URI above for further details.
two elements cannot use the same ID
A statement with an rdf:ID creates a regular triple.
This test shows the treatment of non-ASCII characters in the value of rdf:ID attribute.
This test shows the treatment of non-ASCII characters in the value of rdf:about attribute.
The question posed to the RDF WG was: should an RDF document containing multiple rdf:_n properties (with the same n) on an element be rejected as illegal? The WG decided that a parser should accept that case as legal RDF.
This is not legal RDF; specifying an rdf:parseType of "Literal" and an rdf:resource attribute at the same time is an error.
This is not legal RDF; specifying an rdf:parseType of "Literal" and an rdf:resource attribute at the same time is an error.
The rdf:resource attribute means that the value of this property element is a resource.
The basic case. An empty property element just gives an empty literal.
If the parseType indicates the value is a resource, we must create one. With no additional information, the resource is anonymous.
An empty property element just gives an empty literal. We reify the statement at the same time.
Here the parseType indicates that we should create a resource. We also reify the generated statement.
As test001.rdf; this uses an explicit closing tag.
As test002.rdf; this uses an explicit closing tag.
As test004.rdf; this uses an explicit closing tag.
As test005.rdf; this uses an explicit closing tag.
As test006.rdf; this uses an explicit closing tag.
Test of the last alternative for production [6.12], interpreted according to RDFMS paragraphs 229-234: http://lists.w3.org/Archives/Public/www-archive/2001Jun/att-0021/00-part#229
Test of the last alternative for production [6.12], interpreted according to RDFMS paragraphs 229-234: http://lists.w3.org/Archives/Public/www-archive/2001Jun/att-0021/00-part#229
Test of the last alternative for production [6.12], interpreted according to RDFMS paragraphs 229-234: http://lists.w3.org/Archives/Public/www-archive/2001Jun/att-0021/00-part#229 Here we have an explicit closing tag. This does not match any of the productions in the original document, but is indistinguishable from test014 as far as XML is concerned.
Like rdfms-empty-property-elements/test001.rdf but with a processing instruction as the only content of the otherwise empty element.
Like rdfms-empty-property-elements/test001.rdf but with a comment as the only content of the otherwise empty element.
a RDF Description with no ID or about attribute describes an un-named resource, aka a bNode.
a RDF Description with no ID or about attribute describes an un-named resource, aka a bNode.
a RDF container (in this case a Bag) without an ID attribute describes an un-named resource, aka a bNode.
a RDF container (in this case an Alt) without an ID attribute describes an un-named resource, aka a bNode.
a RDF container (in this case an Seq) without an ID attribute describes an un-named resource, aka a bNode.
rdf:ID on an empty property element indicates reification.
rdf:reource on an empty property element indicates the URI of the object.
rdf:ID and rdf:resource are allowed together on empty property element.
rdf:ID and rdf:resource are allowed together on empty property element.
test case showing that the 2nd URI in M Paragraph 196 is permitted as a namespace URI (and any namespace URI starting with that URI)
The value of rdf:ID must match the XML Name production, (as modified by XML Namespaces).
The value of rdf:ID must match the XML Name production, (as modified by XML Namespaces).
The value of rdf:ID must match the XML Name production, (as modified by XML Namespaces).
The value of rdf:ID must match the XML Name production, (as modified by XML Namespaces).
The value of rdf:ID must match the XML Name production, (as modified by XML Namespaces).
The value of rdf:bagID must match the XML Name production, (as modified by XML Namespaces).
The value of rdf:bagID must match the XML Name production, (as modified by XML Namespaces).
RDF is forbidden as a node element name.
ID is forbidden as a node element name.
about is forbidden as a node element name.
bagID is forbidden as a node element name.
parseType is forbidden as a node element name.
resource is forbidden as a node element name.
nodeID is forbidden as a node element name.
li is forbidden as a node element name.
aboutEach is forbidden as a node element name.
aboutEachPrefix is forbidden as a node element name.
Description is forbidden as a property element name.
RDF is forbidden as a property element name.
ID is forbidden as a property element name.
about is forbidden as a property element name.
bagID is forbidden as a property element name.
parseType is forbidden as a property element name.
resource is forbidden as a property element name.
nodeID is forbidden as a property element name.
aboutEach is forbidden as a property element name.
aboutEachPrefix is forbidden as a property element name.
Description is allowed as a node element name.
Seq is allowed as a node element name.
Bag is allowed as a node element name.
Alt is allowed as a node element name.
Statement is allowed as a node element name.
Property is allowed as a node element name.
List is allowed as a node element name.
subject is allowed as a node element name.
predicate is allowed as a node element name.
object is allowed as a node element name.
type is allowed as a node element name.
value is allowed as a node element name.
first is allowed as a node element name.
rest is allowed as a node element name.
_1 is allowed as a node element name.
nil is allowed as a node element name.
Seq is allowed as a property element name.
Bag is allowed as a property element name.
Alt is allowed as a property element name.
Statement is allowed as a property element name.
Property is allowed as a property element name.
List is allowed as a property element name.
subject is allowed as a property element name.
predicate is allowed as a property element name.
object is allowed as a property element name.
type is allowed as a property element name.
value is allowed as a property element name.
first is allowed as a property element name.
rest is allowed as a property element name.
_1 is allowed as a property element name.
li is allowed as a property element name.
Seq is allowed as a property element name.
Bag is allowed as a property element name.
Alt is allowed as a property element name.
Statement is allowed as a property element name.
Property is allowed as a property element name.
List is allowed as a property element name.
foo is allowed with warnings as a node element name.
foo is allowed with warnings as a property element name.
foo is allowed with warnings as a property attribute name.
A parser is not required to generate a bag of reified statements for all description elements.
rdf:parseType="Collection" is parsed like the nonstandard daml:collection.
rdf:nodeID can be used to label a blank node.
rdf:nodeID can be used to label a blank node. These have file scope and are distinct from any unlabelled blank nodes.
On an rdf:Description or typed node rdf:nodeID behaves similarly to an rdf:about.
On a property element rdf:nodeID behaves similarly to rdf:resource.
The value of rdf:nodeID must match the XML Name production, (as modified by XML Namespaces).
The value of rdf:nodeID must match the XML Name production, (as modified by XML Namespaces).
The value of rdf:nodeID must match the XML Name production, (as modified by XML Namespaces).
Cannot have rdf:nodeID and rdf:ID.
Cannot have rdf:nodeID and rdf:about.
Cannot have rdf:nodeID and rdf:resource.
Demonstrates the Recommended partitioning of a URI into a namespace part and a localname part
In-scope xml:lang applies to element content literal values
In-scope xml:lang applies to element content literal values
In-scope xml:lang applies to element content literal values
In-scope xml:lang applies to element content literal values
a RDF Property may have more than one domain property
a RDF Property may have more than one domain property
Unrecognized attributes in the xml namespace should be ignored.
Unrecognized attributes in the xml namespace should be ignored.
Demonstrating the canonicalisation of XMLLiterals.
xml:base applies to an rdf:ID on an rdf:Description element.
xml:base applies to an rdf:resource attribute.
xml:base applies to an rdf:about attribute.
xml:base applies to an rdf:ID on a property element.
xml:base scoping.
example of relative URI resolution.
example of empty same document ref resolution.
Example of relative uri with absolute path resolution.
Example of relative uri with net path resolution.
Example of xml:base with no path component.
With an xml:base with fragment the fragment is ignored.
Test output corrected to use correct base URL.