This document report test subject conformance for and related specifications for N-Triples [[N-TRIPLES]] 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

Instructions for submitting implementation reports

Tests should be run using the test manifests defined in the Test Manifests Section.

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-TriplesTests/manifest.ttl#nt-syntax-file-01>;
    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 Manifests

N-Triples tests

Test Apache Jena Raptor RDF.rb rdflib
nt-syntax-file-01 PASS PASS PASS PASS
nt-syntax-file-02 PASS PASS PASS PASS
nt-syntax-file-03 PASS PASS PASS PASS
nt-syntax-uri-01 PASS PASS PASS PASS
nt-syntax-uri-02 PASS PASS PASS PASS
nt-syntax-uri-03 PASS PASS PASS PASS
nt-syntax-uri-04 PASS PASS PASS PASS
nt-syntax-string-01 PASS PASS PASS PASS
nt-syntax-string-02 PASS PASS PASS PASS
nt-syntax-string-03 PASS PASS PASS PASS
nt-syntax-str-esc-01 PASS PASS PASS PASS
nt-syntax-str-esc-02 PASS PASS PASS PASS
nt-syntax-str-esc-03 PASS PASS PASS PASS
nt-syntax-bnode-01 PASS PASS PASS PASS
nt-syntax-bnode-02 PASS PASS PASS PASS
nt-syntax-bnode-03 PASS PASS PASS PASS
nt-syntax-datatypes-01 PASS PASS PASS PASS
nt-syntax-datatypes-02 PASS PASS PASS PASS
nt-syntax-bad-uri-01 PASS PASS PASS PASS
nt-syntax-bad-uri-02 PASS PASS PASS PASS
nt-syntax-bad-uri-03 PASS PASS PASS PASS
nt-syntax-bad-uri-04 PASS PASS PASS PASS
nt-syntax-bad-uri-05 PASS PASS PASS PASS
nt-syntax-bad-uri-06 PASS PASS PASS PASS
nt-syntax-bad-uri-07 PASS PASS PASS PASS
nt-syntax-bad-uri-08 PASS PASS PASS PASS
nt-syntax-bad-uri-09 PASS PASS PASS PASS
nt-syntax-bad-prefix-01 PASS PASS PASS PASS
nt-syntax-bad-base-01 PASS PASS PASS PASS
nt-syntax-bad-struct-01 PASS PASS PASS PASS
nt-syntax-bad-struct-02 PASS PASS PASS PASS
nt-syntax-bad-lang-01 PASS PASS PASS PASS
nt-syntax-bad-esc-01 PASS PASS PASS PASS
nt-syntax-bad-esc-02 PASS PASS PASS PASS
nt-syntax-bad-esc-03 PASS PASS PASS PASS
nt-syntax-bad-string-01 PASS PASS PASS PASS
nt-syntax-bad-string-02 PASS PASS PASS PASS
nt-syntax-bad-string-03 PASS PASS PASS PASS
nt-syntax-bad-string-04 PASS PASS PASS PASS
nt-syntax-bad-string-05 PASS PASS PASS PASS
nt-syntax-bad-string-06 PASS PASS PASS PASS
nt-syntax-bad-string-07 PASS PASS PASS PASS
nt-syntax-bad-num-01 PASS PASS PASS PASS
nt-syntax-bad-num-02 PASS PASS PASS PASS
nt-syntax-bad-num-03 PASS PASS PASS PASS
nt-syntax-subm-01 PASS PASS PASS PASS
comment_following_triple PASS PASS PASS UNTESTED
literal PASS PASS PASS UNTESTED
literal_all_controls PASS PASS PASS PASS
literal_all_punctuation PASS PASS PASS PASS
literal_ascii_boundaries PASS PASS PASS UNTESTED
literal_with_2_dquotes PASS PASS PASS UNTESTED
literal_with_2_squotes PASS PASS PASS UNTESTED
literal_with_BACKSPACE PASS PASS PASS UNTESTED
literal_with_CARRIAGE_RETURN PASS PASS PASS UNTESTED
literal_with_CHARACTER_TABULATION PASS PASS PASS UNTESTED
literal_with_dquote PASS PASS PASS UNTESTED
literal_with_FORM_FEED PASS PASS PASS UNTESTED
literal_with_LINE_FEED PASS PASS PASS UNTESTED
literal_with_numeric_escape4 PASS PASS PASS UNTESTED
literal_with_numeric_escape8 PASS PASS PASS UNTESTED
literal_with_REVERSE_SOLIDUS PASS PASS PASS UNTESTED
literal_with_REVERSE_SOLIDUS2 PASS PASS PASS UNTESTED
literal_with_squote PASS PASS PASS UNTESTED
literal_with_UTF8_boundaries PASS PASS PASS UNTESTED
langtagged_string PASS PASS PASS UNTESTED
lantag_with_subtag PASS PASS PASS UNTESTED
minimal_whitespace PASS PASS PASS UNTESTED
Percentage passed out of 68 Tests 100.0% 100.0% 100.0% 70.6%

Test Subjects

This report was tested using the following test subjects:

Apache Jena
Description
Apache Jena provides a complete framework for building Semantic Web and Linked Data applications in Java, and provides: parsers for RDF/XML, Turtle and N-triples; a Java programming API; a complete implementation of the SPARQL query language; a rule-based inference engine for RDFS and OWL entailments; TDB (a non-SQL persistent triple store); SDB (a persistent triples store built on a relational store) and Fuseki, an RDF server using web protocols. Jena complies with all relevant recommendations for RDF and related technologies from the W3C.
Programming Language
Java
Home Page
http://jena.apache.org
Developer
Rob Vesse
Paolo Castagna
Chris Dollin
Stephen Allen
Ian Dickinson
Damian Steer
Andy Seaborne
Claude Warren
Dave Reynolds
Test Suite Compliance
68/68 (100.0%)
Raptor
Programming Language
C
Home Page
http://librdf.org/raptor/
Developer
Home Page
http://www.dajobe.org/
Test Suite Compliance
68/68 (100.0%)
RDF.rb
Description
RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data.
Home Page
http://rubygems.org/gems/rdf
Developer
Arto Bendiken
Home Page
http://ar.to/
Ben Lavender
Home Page
http://bhuga.net/
Gregg Kellogg
Home Page
http://greggkellogg.net/
Test Suite Compliance
68/68 (100.0%)
rdflib
Home Page
https://github.com/RDFLib/rdflib
Developer
Gunnar Aastrand Grimnes
Home Page
http://gromgull.net
Test Suite Compliance
48/68 (70.6%)

Individual Test Results

Individual test results used to construct this report are available here:

Test Definitions

Test nt-syntax-file-01

Empty file


          
Test nt-syntax-file-02

Only comment

#Empty file.
Test nt-syntax-file-03

One comment, one empty line

#One comment, one empty line.

Test nt-syntax-uri-01

Only IRIs

<http://example/s> <http://example/p> <http://example/o> .
Test nt-syntax-uri-02

IRIs with Unicode escape

# x53 is capital S
<http://example/\u0053> <http://example/p> <http://example/o> .
Test nt-syntax-uri-03

IRIs with long Unicode escape

# x53 is capital S
<http://example/\U00000053> <http://example/p> <http://example/o> .
Test nt-syntax-uri-04

Legal IRIs

# IRI with all chars in it.
<http://example/s> <http://example/p> <scheme:!$%25&'()*+,-./0123456789:/@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~?#> .
Test nt-syntax-string-01

string literal

<http://example/s> <http://example/p> "string" .
Test nt-syntax-string-02

langString literal

<http://example/s> <http://example/p> "string"@en .
Test nt-syntax-string-03

langString literal with region

<http://example/s> <http://example/p> "string"@en-uk .
Test nt-syntax-str-esc-01

string literal with escaped newline

<http://example/s> <http://example/p> "a\n" .
Test nt-syntax-str-esc-02

string literal with Unicode escape

<http://example/s> <http://example/p> "a\u0020b" .
Test nt-syntax-str-esc-03

string literal with long Unicode escape

<http://example/s> <http://example/p> "a\U00000020b" .
Test nt-syntax-bnode-01

bnode subject

_:a  <http://example/p> <http://example/o> .
Test nt-syntax-bnode-02

bnode object

<http://example/s> <http://example/p> _:a .
_:a <http://example/p> <http://example/o> .
Test nt-syntax-bnode-03

Blank node labels may start with a digit

<http://example/s> <http://example/p> _:1a .
_:1a <http://example/p> <http://example/o> .
Test nt-syntax-datatypes-01

xsd:byte literal

<http://example/s> <http://example/p> "123"^^<http://www.w3.org/2001/XMLSchema#byte> .
Test nt-syntax-datatypes-02

integer as xsd:string

<http://example/s> <http://example/p> "123"^^<http://www.w3.org/2001/XMLSchema#string> .
Test nt-syntax-bad-uri-01

Bad IRI : space (negative test)

# Bad IRI : space.
<http://example/ space> <http://example/p> <http://example/o> .
Test nt-syntax-bad-uri-02

Bad IRI : bad escape (negative test)

# Bad IRI : bad escape
<http://example/\u00ZZ11> <http://example/p> <http://example/o> .
Test nt-syntax-bad-uri-03

Bad IRI : bad long escape (negative test)

# Bad IRI : bad escape
<http://example/\U00ZZ1111> <http://example/p> <http://example/o> .
Test nt-syntax-bad-uri-04

Bad IRI : character escapes not allowed (negative test)

# Bad IRI : character escapes not allowed.
<http://example/\n> <http://example/p> <http://example/o> .
Test nt-syntax-bad-uri-05

Bad IRI : character escapes not allowed (2) (negative test)

# Bad IRI : character escapes not allowed.
<http://example/\/> <http://example/p> <http://example/o> .
Test nt-syntax-bad-uri-06

Bad IRI : relative IRI not allowed in subject (negative test)

# No relative IRIs in N-Triples
<s> <http://example/p> <http://example/o> .
Test nt-syntax-bad-uri-07

Bad IRI : relative IRI not allowed in predicate (negative test)

# No relative IRIs in N-Triples
<http://example/s> <p> <http://example/o> .
Test nt-syntax-bad-uri-08

Bad IRI : relative IRI not allowed in object (negative test)

# No relative IRIs in N-Triples
<http://example/s> <http://example/p> <o> .
Test nt-syntax-bad-uri-09

Bad IRI : relative IRI not allowed in datatype (negative test)

# No relative IRIs in N-Triples
<http://example/s> <http://example/p> "foo"^^<dt> .
Test nt-syntax-bad-prefix-01

@prefix not allowed in n-triples (negative test)

@prefix : <http://example/> .
Test nt-syntax-bad-base-01

@base not allowed in N-Triples (negative test)

@base <http://example/> .
Test nt-syntax-bad-struct-01

N-Triples does not have objectList (negative test)

<http://example/s> <http://example/p> <http://example/o>, <http://example/o2> .
Test nt-syntax-bad-struct-02

N-Triples does not have predicateObjectList (negative test)

<http://example/s> <http://example/p> <http://example/o>; <http://example/p2>, <http://example/o2> .
Test nt-syntax-bad-lang-01

langString with bad lang (negative test)

# Bad lang tag
<http://example/s> <http://example/p> "string"@1 .
Test nt-syntax-bad-esc-01

Bad string escape (negative test)

# Bad string escape
<http://example/s> <http://example/p> "a\zb" .
Test nt-syntax-bad-esc-02

Bad string escape (negative test)

# Bad string escape
<http://example/s> <http://example/p> "\uWXYZ" .
Test nt-syntax-bad-esc-03

Bad string escape (negative test)

# Bad string escape
<http://example/s> <http://example/p> "\U0000WXYZ" .
Test nt-syntax-bad-string-01

mismatching string literal open/close (negative test)

<http://example/s> <http://example/p> "abc' .
Test nt-syntax-bad-string-02

mismatching string literal open/close (negative test)

<http://example/s> <http://example/p> 1.0 .
Test nt-syntax-bad-string-03

single quotes (negative test)

<http://example/s> <http://example/p> 1.0e1 .
Test nt-syntax-bad-string-04

long single string literal (negative test)

<http://example/s> <http://example/p> '''abc''' .
Test nt-syntax-bad-string-05

long double string literal (negative test)

<http://example/s> <http://example/p> """abc""" .
Test nt-syntax-bad-string-06

string literal with no end (negative test)

<http://example/s> <http://example/p> "abc .
Test nt-syntax-bad-string-07

string literal with no start (negative test)

<http://example/s> <http://example/p> abc" .
Test nt-syntax-bad-num-01

no numbers in N-Triples (integer) (negative test)

<http://example/s> <http://example/p> 1 .
Test nt-syntax-bad-num-02

no numbers in N-Triples (decimal) (negative test)

<http://example/s> <http://example/p> 1.0 .
Test nt-syntax-bad-num-03

no numbers in N-Triples (float) (negative test)

<http://example/s> <http://example/p> 1.0e0 .
Test nt-syntax-subm-01

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: index.html,v 1.2 2014/02/20 21:23:04 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
Test comment_following_triple

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
Test literal

literal """x"""

<http://a.example/s> <http://a.example/p> "x" .
Test literal_all_controls

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" .
Test literal_all_punctuation

literal_all_punctuation '!"#$%&()...'

<http://a.example/s> <http://a.example/p> " !\"#$%&():;<=>?@[]^_`{|}~" .
Test literal_ascii_boundaries

literal_ascii_boundaries '\x00\x26\x28...'

<http://a.example/s> <http://a.example/p> "	&([]" .
Test literal_with_2_dquotes

literal with 2 squotes """a""b"""

<http://a.example/s> <http://a.example/p> "x\"\"y" .
Test literal_with_2_squotes

literal with 2 squotes "x''y"

<http://a.example/s> <http://a.example/p> "x''y" .
Test literal_with_BACKSPACE

literal with BACKSPACE

<http://a.example/s> <http://a.example/p> "\b" .
Test literal_with_CARRIAGE_RETURN

literal with CARRIAGE RETURN

<http://a.example/s> <http://a.example/p> "\r" .
Test literal_with_CHARACTER_TABULATION

literal with CHARACTER TABULATION

<http://a.example/s> <http://a.example/p> "\t" .
Test literal_with_dquote

literal with dquote "x"y"

<http://a.example/s> <http://a.example/p> "x\"y" .
Test literal_with_FORM_FEED

literal with FORM FEED

<http://a.example/s> <http://a.example/p> "\f" .
Test literal_with_LINE_FEED

literal with LINE FEED

<http://a.example/s> <http://a.example/p> "\n" .
Test literal_with_numeric_escape4

literal with numeric escape4 \u

<http://a.example/s> <http://a.example/p> "\u006F" .
Test literal_with_numeric_escape8

literal with numeric escape8 \U

<http://a.example/s> <http://a.example/p> "\U0000006F" .
Test literal_with_REVERSE_SOLIDUS

literal with REVERSE SOLIDUS

<http://a.example/s> <http://a.example/p> "\\" .
Test literal_with_REVERSE_SOLIDUS2

REVERSE SOLIDUS at end of literal

<http://example.org/ns#s> <http://example.org/ns#p1> "test-\\" .
Test literal_with_squote

literal with squote "x'y"

<http://a.example/s> <http://a.example/p> "x'y" .
Test literal_with_UTF8_boundaries

literal_with_UTF8_boundaries '\x80\x7ff\x800\xfff...'

<http://a.example/s> <http://a.example/p> "€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽" .
Test langtagged_string

langtagged string "x"@en

<http://a.example/s> <http://a.example/p> "chat"@en .
Test lantag_with_subtag

lantag with subtag "x"@en-us

<http://example.org/ex#a> <http://example.org/ex#b> "Cheers"@en-UK .
Test minimal_whitespace

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.

Report Generation Software

This report generated by earl-report version 0.3.1 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.