This document is also available in these non-normative formats: Turtle and JSON-LD
This document is licensed under a Creative Commons Attribution 3.0 License.
This document report test subject conformance for and related specifications for N-Quads [N-QUADS] according to the requirements of the Evaluation and Report Language (EARL) 1.0 Schema [EARL10-SCHEMA].
This report is also available in alternate formats: Turtle and JSON-LD
See also the Implementation report for PR transition (a step in the W3C process).
This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.
New Version Available
The RDF Test Curation Community Group is maintaining updates to important test suites, including for N-Quads. The new tests are available at http://w3c.github.io/rdf-tests/nquads/ along with an updated Implementation Report.
Tests should be run using the test manifests defined in the Test Manifests Section.
The assumed base URI for the tests is <http://example/base/>
if needed.
Reports should be submitted in Turtle format to public-rdf-comments@w3.org
and include an earl:Assertion
for each test, referencing the test resource from the associated manifest
and the test subject being reported upon. An example test entry is be the following:
[ a earl:Assertion;
earl:assertedBy <http://greggkellogg.net/foaf#me>;
earl:subject <http://rubygems.org/gems/rdf>;
earl:test <http://www.w3.org/2013/N-QuadsTests/manifest.ttl#nq-syntax-uri-01.nq>;
earl:result [
a earl:TestResult;
earl:outcome earl:passed;
dc:date "2013-02-22T15:12:30-08:00"^^xsd:dateTime];
earl:mode earl:automatic ] .
The Test Subject should be defined as a doap:Project
, including the name,
homepage and developer(s) of the software (see [DOAP]). Optionally, including the
project description and programming language. An example test subject description is the following:
<> foaf:primaryTopic <http://rubygems.org/gems/rdf>
dc:issued "2013-02-22T15:12:30-08:00"^^xsd:dateTime ;
foaf:maker <http://greggkellogg.net/foaf#me> .
<http://rubygems.org/gems/rdf> a doap:Project, earl:TestSubject, earl:Software ;
doap:name "RDF.rb" ;
doap:homepage <http://rubygems.org/gems/rdf> ;
doap:license <http://creativecommons.org/licenses/publicdomain/> ;
doap:description "RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data."@en ;
doap:developer <http://ar.to/#self>, <http://bhuga.net/#ben>, <http://greggkellogg.net/foaf#me> ;
doap:maintainer <http://ar.to/#self>, <http://bhuga.net/#ben>, <http://greggkellogg.net/foaf#me> ;
doap:documenter <http://ar.to/#self>, <http://bhuga.net/#ben>, <http://greggkellogg.net/foaf#me> ;
foaf:maker <http://ar.to/#self> ;
dc:creator <http://ar.to/#self> .
The software developer, either an organization or one or more individuals SHOULD be
referenced from doap:developer
using [FOAF]. For example:
<http://greggkellogg.net/foaf#me> a foaf:Person, earl:Assertor;
foaf:name "Gregg Kellogg";
foaf:title "Implementor";
foaf:homepage <http://greggkellogg.net/> .
See Turtle Test Suite Wiki for more information.
Test | Apache Jena | Raptor | RDF.rb | rdflib | N3.js |
---|---|---|---|---|---|
nq-syntax-uri-01 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-uri-02 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-uri-03 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-uri-04 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-uri-05 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-uri-06 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bnode-01 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bnode-02 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bnode-03 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bnode-04 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bnode-05 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bnode-06 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bad-literal-01 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bad-literal-02 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bad-literal-03 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bad-uri-01 | PASS | PASS | PASS | PASS | PASS |
nq-syntax-bad-quint-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-file-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-file-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-file-03 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-uri-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-uri-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-uri-03 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-uri-04 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-string-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-string-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-string-03 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-str-esc-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-str-esc-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-str-esc-03 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bnode-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bnode-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bnode-03 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-datatypes-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-datatypes-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-uri-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-uri-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-uri-03 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-uri-04 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-uri-05 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-uri-06 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-uri-07 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-uri-08 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-uri-09 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-prefix-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-base-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-struct-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-struct-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-lang-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-esc-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-esc-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-esc-03 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-string-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-string-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-string-03 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-string-04 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-string-05 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-string-06 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-string-07 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-num-01 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-num-02 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-bad-num-03 | PASS | PASS | PASS | PASS | PASS |
nt-syntax-subm-01 | PASS | PASS | PASS | PASS | PASS |
comment_following_triple | PASS | PASS | PASS | PASS | PASS |
literal | PASS | PASS | PASS | PASS | PASS |
literal_all_controls | PASS | PASS | PASS | PASS | PASS |
literal_all_punctuation | PASS | PASS | PASS | PASS | PASS |
literal_ascii_boundaries | PASS | PASS | PASS | PASS | PASS |
literal_with_2_dquotes | PASS | PASS | PASS | PASS | PASS |
literal_with_2_squotes | PASS | PASS | PASS | PASS | PASS |
literal_with_BACKSPACE | PASS | PASS | PASS | PASS | PASS |
literal_with_CARRIAGE_RETURN | PASS | PASS | PASS | PASS | PASS |
literal_with_CHARACTER_TABULATION | PASS | PASS | PASS | PASS | PASS |
literal_with_dquote | PASS | PASS | PASS | PASS | PASS |
literal_with_FORM_FEED | PASS | PASS | PASS | PASS | PASS |
literal_with_LINE_FEED | PASS | PASS | PASS | PASS | PASS |
literal_with_numeric_escape4 | PASS | PASS | PASS | PASS | PASS |
literal_with_numeric_escape8 | PASS | PASS | PASS | PASS | PASS |
literal_with_REVERSE_SOLIDUS | PASS | PASS | PASS | PASS | PASS |
literal_with_REVERSE_SOLIDUS2 | PASS | PASS | PASS | PASS | PASS |
literal_with_squote | PASS | PASS | PASS | PASS | PASS |
literal_with_UTF8_boundaries | PASS | PASS | PASS | PASS | PASS |
langtagged_string | PASS | PASS | PASS | PASS | PASS |
lantag_with_subtag | PASS | PASS | PASS | PASS | PASS |
minimal_whitespace | PASS | PASS | PASS | PASS | PASS |
Percentage passed out of 85 Tests | 100.0% | 100.0% | 100.0% | 100.0% | 100.0% |
This report was tested using the following test subjects:
85/85 (100.0%) |
85/85 (100.0%) |
85/85 (100.0%) |
85/85 (100.0%) |
85/85 (100.0%) |
Individual test results used to construct this report are available here:
URI graph with URI triple
<http://example/s> <http://example/p> <http://example/o> <http://example/g> .
URI graph with BNode subject
_:s <http://example/p> <http://example/o> <http://example/g> .
URI graph with BNode object
<http://example/s> <http://example/p> _:o <http://example/g> .
URI graph with simple literal
<http://example/s> <http://example/p> "o" <http://example/g> .
URI graph with language tagged literal
<http://example/s> <http://example/p> "o"@en <http://example/g> .
URI graph with datatyped literal
<http://example/s> <http://example/p> "o"^^<http://www.w3.org/2001/XMLSchema#string> <http://example/g> .
BNode graph with URI triple
<http://example/s> <http://example/p> <http://example/o> _:g .
BNode graph with BNode subject
_:s <http://example/p> <http://example/o> _:g .
BNode graph with BNode object
<http://example/s> <http://example/p> _:o _:g .
BNode graph with simple literal
<http://example/s> <http://example/p> "o" _:g .
BNode graph with language tagged literal
<http://example/s> <http://example/p> "o"@en _:g .
BNode graph with datatyped literal
<http://example/s> <http://example/p> "o"^^<http://www.w3.org/2001/XMLSchema#string> _:g .
Graph name may not be a simple literal (negative test)
<http://example/s> <http://example/p> <http://example/o> "o" .
Graph name may not be a language tagged literal (negative test)
<http://example/s> <http://example/p> <http://example/o> "o"@en .
Graph name may not be a datatyped literal (negative test)
<http://example/s> <http://example/p> <http://example/o> "o"^^<http://www.w3.org/2001/XMLSchema#string> .
Graph name URI must be absolute (negative test)
# No relative IRIs in N-Quads
<http://example/s> <http://example/p> <http://example/o> <g>.
N-Quads does not have a fifth element (negative test)
# N-Quads rejects a quint
<http://example/s> <http://example/p> <http://example/o> <http://example/g> <http://example/n> .
Empty file
Only comment
#Empty file.
One comment, one empty line
#One comment, one empty line.
Only IRIs
<http://example/s> <http://example/p> <http://example/o> .
IRIs with Unicode escape
# x53 is capital S
<http://example/\u0053> <http://example/p> <http://example/o> .
IRIs with long Unicode escape
# x53 is capital S
<http://example/\U00000053> <http://example/p> <http://example/o> .
Legal IRIs
# IRI with all chars in it.
<http://example/s> <http://example/p> <scheme:!$%25&'()*+,-./0123456789:/@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~?#> .
string literal
<http://example/s> <http://example/p> "string" .
langString literal
<http://example/s> <http://example/p> "string"@en .
langString literal with region
<http://example/s> <http://example/p> "string"@en-uk .
string literal with escaped newline
<http://example/s> <http://example/p> "a\n" .
string literal with Unicode escape
<http://example/s> <http://example/p> "a\u0020b" .
string literal with long Unicode escape
<http://example/s> <http://example/p> "a\U00000020b" .
bnode subject
_:a <http://example/p> <http://example/o> .
bnode object
<http://example/s> <http://example/p> _:a .
_:a <http://example/p> <http://example/o> .
Blank node labels may start with a digit
<http://example/s> <http://example/p> _:1a .
_:1a <http://example/p> <http://example/o> .
xsd:byte literal
<http://example/s> <http://example/p> "123"^^<http://www.w3.org/2001/XMLSchema#byte> .
integer as xsd:string
<http://example/s> <http://example/p> "123"^^<http://www.w3.org/2001/XMLSchema#string> .
Bad IRI : space (negative test)
# Bad IRI : space.
<http://example/ space> <http://example/p> <http://example/o> .
Bad IRI : bad escape (negative test)
# Bad IRI : bad escape
<http://example/\u00ZZ11> <http://example/p> <http://example/o> .
Bad IRI : bad long escape (negative test)
# Bad IRI : bad escape
<http://example/\U00ZZ1111> <http://example/p> <http://example/o> .
Bad IRI : character escapes not allowed (negative test)
# Bad IRI : character escapes not allowed.
<http://example/\n> <http://example/p> <http://example/o> .
Bad IRI : character escapes not allowed (2) (negative test)
# Bad IRI : character escapes not allowed.
<http://example/\/> <http://example/p> <http://example/o> .
Bad IRI : relative IRI not allowed in subject (negative test)
# No relative IRIs in N-Triples
<s> <http://example/p> <http://example/o> .
Bad IRI : relative IRI not allowed in predicate (negative test)
# No relative IRIs in N-Triples
<http://example/s> <p> <http://example/o> .
Bad IRI : relative IRI not allowed in object (negative test)
# No relative IRIs in N-Triples
<http://example/s> <http://example/p> <o> .
Bad IRI : relative IRI not allowed in datatype (negative test)
# No relative IRIs in N-Triples
<http://example/s> <http://example/p> "foo"^^<dt> .
@prefix not allowed in n-triples (negative test)
@prefix : <http://example/> .
@base not allowed in N-Triples (negative test)
@base <http://example/> .
N-Triples does not have objectList (negative test)
<http://example/s> <http://example/p> <http://example/o>, <http://example/o2> .
N-Triples does not have predicateObjectList (negative test)
<http://example/s> <http://example/p> <http://example/o>; <http://example/p2>, <http://example/o2> .
langString with bad lang (negative test)
# Bad lang tag
<http://example/s> <http://example/p> "string"@1 .
Bad string escape (negative test)
# Bad string escape
<http://example/s> <http://example/p> "a\zb" .
Bad string escape (negative test)
# Bad string escape
<http://example/s> <http://example/p> "\uWXYZ" .
Bad string escape (negative test)
# Bad string escape
<http://example/s> <http://example/p> "\U0000WXYZ" .
mismatching string literal open/close (negative test)
<http://example/s> <http://example/p> "abc' .
mismatching string literal open/close (negative test)
<http://example/s> <http://example/p> 1.0 .
single quotes (negative test)
<http://example/s> <http://example/p> 1.0e1 .
long single string literal (negative test)
<http://example/s> <http://example/p> '''abc''' .
long double string literal (negative test)
<http://example/s> <http://example/p> """abc""" .
string literal with no end (negative test)
<http://example/s> <http://example/p> "abc .
string literal with no start (negative test)
<http://example/s> <http://example/p> abc" .
no numbers in N-Triples (integer) (negative test)
<http://example/s> <http://example/p> 1 .
no numbers in N-Triples (decimal) (negative test)
<http://example/s> <http://example/p> 1.0 .
no numbers in N-Triples (float) (negative test)
<http://example/s> <http://example/p> 1.0e0 .
Submission test from Original RDF Test Cases
#
# Copyright World Wide Web Consortium, (Massachusetts Institute of
# Technology, Institut National de Recherche en Informatique et en
# Automatique, Keio University).
#
# All Rights Reserved.
#
# Please see the full Copyright clause at
# <http://www.w3.org/Consortium/Legal/copyright-software.html>
#
# Test file with a variety of legal N-Triples
#
# Dave Beckett - http://purl.org/net/dajobe/
#
# $Id: nt-syntax-subm-01.nq,v 1.1 2014-02-18 05:03:40 sandro Exp $
#
#####################################################################
# comment lines
# comment line after whitespace
# empty blank line, then one with spaces and tabs
<http://example.org/resource1> <http://example.org/property> <http://example.org/resource2> .
_:anon <http://example.org/property> <http://example.org/resource2> .
<http://example.org/resource2> <http://example.org/property> _:anon .
# spaces and tabs throughout:
<http://example.org/resource3> <http://example.org/property> <http://example.org/resource2> .
# line ending with CR NL (ASCII 13, ASCII 10)
<http://example.org/resource4> <http://example.org/property> <http://example.org/resource2> .
# 2 statement lines separated by single CR (ASCII 10)
<http://example.org/resource5> <http://example.org/property> <http://example.org/resource2> .
<http://example.org/resource6> <http://example.org/property> <http://example.org/resource2> .
# All literal escapes
<http://example.org/resource7> <http://example.org/property> "simple literal" .
<http://example.org/resource8> <http://example.org/property> "backslash:\\" .
<http://example.org/resource9> <http://example.org/property> "dquote:\"" .
<http://example.org/resource10> <http://example.org/property> "newline:\n" .
<http://example.org/resource11> <http://example.org/property> "return\r" .
<http://example.org/resource12> <http://example.org/property> "tab:\t" .
# Space is optional before final .
<http://example.org/resource13> <http://example.org/property> <http://example.org/resource2>.
<http://example.org/resource14> <http://example.org/property> "x".
<http://example.org/resource15> <http://example.org/property> _:anon.
# \u and \U escapes
# latin small letter e with acute symbol \u00E9 - 3 UTF-8 bytes #xC3 #A9
<http://example.org/resource16> <http://example.org/property> "\u00E9" .
# Euro symbol \u20ac - 3 UTF-8 bytes #xE2 #x82 #xAC
<http://example.org/resource17> <http://example.org/property> "\u20AC" .
# resource18 test removed
# resource19 test removed
# resource20 test removed
# XML Literals as Datatyped Literals
<http://example.org/resource21> <http://example.org/property> ""^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .
<http://example.org/resource22> <http://example.org/property> " "^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .
<http://example.org/resource23> <http://example.org/property> "x"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .
<http://example.org/resource23> <http://example.org/property> "\""^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .
<http://example.org/resource24> <http://example.org/property> "<a></a>"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .
<http://example.org/resource25> <http://example.org/property> "a <b></b>"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .
<http://example.org/resource26> <http://example.org/property> "a <b></b> c"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .
<http://example.org/resource26> <http://example.org/property> "a\n<b></b>\nc"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .
<http://example.org/resource27> <http://example.org/property> "chat"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .
# resource28 test removed 2003-08-03
# resource29 test removed 2003-08-03
# Plain literals with languages
<http://example.org/resource30> <http://example.org/property> "chat"@fr .
<http://example.org/resource31> <http://example.org/property> "chat"@en .
# Typed Literals
<http://example.org/resource32> <http://example.org/property> "abc"^^<http://example.org/datatype1> .
# resource33 test removed 2003-08-03
Tests comments after a triple
<http://example/s> <http://example/p> <http://example/o> . # comment
<http://example/s> <http://example/p> _:o . # comment
<http://example/s> <http://example/p> "o" . # comment
<http://example/s> <http://example/p> "o"^^<http://example/dt> . # comment
<http://example/s> <http://example/p> "o"@en . # comment
literal """x"""
<http://a.example/s> <http://a.example/p> "x" .
literal_all_controls '\x00\x01\x02\x03\x04...'
<http://a.example/s> <http://a.example/p> "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\t\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" .
literal_all_punctuation '!"#$%&()...'
<http://a.example/s> <http://a.example/p> " !\"#$%&():;<=>?@[]^_`{|}~" .
literal_ascii_boundaries '\x00\x26\x28...'
<http://a.example/s> <http://a.example/p> " &([]" .
literal with 2 squotes """a""b"""
<http://a.example/s> <http://a.example/p> "x\"\"y" .
literal with 2 squotes "x''y"
<http://a.example/s> <http://a.example/p> "x''y" .
literal with BACKSPACE
<http://a.example/s> <http://a.example/p> "\b" .
literal with CARRIAGE RETURN
<http://a.example/s> <http://a.example/p> "\r" .
literal with CHARACTER TABULATION
<http://a.example/s> <http://a.example/p> "\t" .
literal with dquote "x"y"
<http://a.example/s> <http://a.example/p> "x\"y" .
literal with FORM FEED
<http://a.example/s> <http://a.example/p> "\f" .
literal with LINE FEED
<http://a.example/s> <http://a.example/p> "\n" .
literal with numeric escape4 \u
<http://a.example/s> <http://a.example/p> "\u006F" .
literal with numeric escape8 \U
<http://a.example/s> <http://a.example/p> "\U0000006F" .
literal with REVERSE SOLIDUS
<http://a.example/s> <http://a.example/p> "\\" .
REVERSE SOLIDUS at end of literal
<http://example.org/ns#s> <http://example.org/ns#p1> "test-\\" .
literal with squote "x'y"
<http://a.example/s> <http://a.example/p> "x'y" .
literal_with_UTF8_boundaries '\x80\x7ff\x800\xfff...'
<http://a.example/s> <http://a.example/p> "߿ࠀက쿿퀀�𐀀" .
langtagged string "x"@en
<http://a.example/s> <http://a.example/p> "chat"@en .
lantag with subtag "x"@en-us
<http://example.org/ex#a> <http://example.org/ex#b> "Cheers"@en-UK .
tests absense of whitespace between subject, predicate, object and end-of-statement
<http://example/s><http://example/p><http://example/o>.
<http://example/s><http://example/p>"Alice".
<http://example/s><http://example/p>_:o.
_:s<http://example/p><http://example/o>.
_:s<http://example/p>"Alice".
_:s<http://example/p>_:bnode1.
This report generated by earl-report version 0.3.4 an Unlicensed Ruby application. More information is available at https://github.com/gkellogg/earl-report .
This software is provided by Gregg Kellogg in hopes that it might make the lives of conformance testers easier.