--- a/drafts/n-triples/Overview.html Sun Aug 11 16:45:09 2013 -0700
+++ b/drafts/n-triples/Overview.html Sun Aug 11 16:45:34 2013 -0700
@@ -1,11 +1,10 @@
<!DOCTYPE html>
-<html lang="en" dir="ltr">
+<html lang="en" dir="ltr" typeof="bibo:Document w3p:LastCall" about="" property="dcterms:language" content="en" prefix="bibo: http://purl.org/ontology/bibo/ w3p: http://www.w3.org/2001/02pd/rec54#">
<head>
<title>N-Triples</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-
-
-
+
+
<style type="text/css">
/* Style Turtle script blocks to be visable */
@@ -64,12 +63,6 @@
color: #ff4500;
}
-
-/* --- --- */
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
/* --- TOC --- */
.toc a, .tof a {
text-decoration: none;
@@ -165,61 +158,22 @@
aside.example div.example div.example-title {
color: #999;
}
-</style><style>/* --- ISSUES/NOTES --- */
-div.issue-title, div.note-title {
- padding-right: 1em;
- min-width: 7.5em;
- color: #b9ab2d;
-}
-div.issue-title { color: #e05252; }
-div.note-title { color: #52e052; }
-div.issue-title span, div.note-title span {
- text-transform: uppercase;
-}
-div.note, div.issue {
- margin-top: 1em;
- margin-bottom: 1em;
-}
-.note > p:first-child, .issue > p:first-child { margin-top: 0 }
-.issue, .note {
- padding: .5em;
- border-left-width: .5em;
- border-left-style: solid;
-}
-div.issue, div.note {
- padding: 0.5em;
- margin: 1em 0;
- position: relative;
- clear: both;
-}
-span.note, span.issue { padding: .1em .5em .15em; }
-
-.issue {
- border-color: #e05252;
- background: #fbe9e9;
-}
-.note {
- border-color: #52e052;
- background: #e9fbe9;
-}
-
-
-</style><link href="http://www.w3.org/StyleSheets/TR/W3C-WG-NOTE" rel="stylesheet"><!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head>
- <body><div class="head">
+</style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/W3C-WD"></head>
+ <body class="h-entry"><div class="head">
<p>
- <a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a>
+ <a href="http://www.w3.org/"><img width="72" height="48" src="https://www.w3.org/Icons/w3c_home" alt="W3C"></a>
</p>
- <h1 class="title" id="title">N-Triples</h1>
+ <h1 class="title p-name" id="title" property="dcterms:title">N-Triples</h1>
- <h2 id="subtitle">A line-based syntax for an RDF graph</h2>
+ <h2 property="bibo:subtitle" id="subtitle">A line-based syntax for an RDF graph</h2>
- <h2 id="w3c-working-group-note-09-april-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Working Group Note 09 April 2013</h2>
+ <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2013-08-28T07:00:00.000Z" id="w3c-last-call-working-draft-28-august-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Last Call Working Draft <time class="dt-published" datetime="2013-08-28">28 August 2013</time></h2>
<dl>
<dt>This version:</dt>
- <dd><a href="http://www.w3.org/TR/2013/NOTE-n-triples-20130409/">http://www.w3.org/TR/2013/NOTE-n-triples-20130409/</a></dd>
+ <dd><a class="u-url" href="http://www.w3.org/TR/2013/WD-n-triples-20130828/">http://www.w3.org/TR/2013/WD-n-triples-20130828/</a></dd>
<dt>Latest published version:</dt>
<dd><a href="http://www.w3.org/TR/n-triples/">http://www.w3.org/TR/n-triples/</a></dd>
@@ -232,17 +186,20 @@
<dt>Previous version:</dt>
- <dd><a href=""></a></dd>
+ <dd><a rel="dcterms:replaces" href="http://www.w3.org/TR/2013/NOTE-n-triples-20130409/">http://www.w3.org/TR/2013/NOTE-n-triples-20130409/</a></dd>
<dt>Editor:</dt>
- <dd><span>Gavin Carothers</span>, <a href="https://lexmachina.com/">Lex Machina, Inc</a></dd>
+ <dd class="p-author h-card vcard" rel="bibo:editor" inlist=""><span typeof="foaf:Person"><span property="foaf:name" class="p-name fn">Gavin Carothers</span>, <a rel="foaf:workplaceHomepage" class="p-org org h-org h-card" href="https://lexmachina.com/">Lex Machina, Inc</a></span>
+</dd>
<dt>Author:</dt>
- <dd><a href="http://www.dajobe.org/">David Beckett</a></dd>
+ <dd class="p-author h-card vcard" rel="dcterms:contributor"><span typeof="foaf:Person"><a class="u-url url p-name fn" rel="foaf:homepage" property="foaf:name" content="David Beckett" href="http://www.dajobe.org/">David Beckett</a></span>
+</dd>
+
</dl>
@@ -250,10 +207,10 @@
<p class="copyright">
- <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
2001-2013
- <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
+ <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
(<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
<a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
<a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved.
@@ -265,9 +222,9 @@
<hr>
</div>
- <section class="introductory" id="abstract"><h2>Abstract</h2><p>
+ <section id="abstract" class="introductory" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#abstract" rel="bibo:chapter"><h2>Abstract</h2><p>
N-Triples is a line-based, plain text format for encoding an RDF graph.
-</p></section><section id="sotd" class="introductory"><h2>Status of This Document</h2>
+</p></section><section id="sotd" class="introductory" typeof="bibo:Chapter" resource="#sotd" rel="bibo:chapter"><h2>Status of This Document</h2>
@@ -279,13 +236,15 @@
</p>
N-Triples was originally defined as a syntax for
-the RDF Test Cases [<cite><a href="#bib-RDF-TESTCASES" class="bibref">RDF-TESTCASES</a></cite>] document. Due to its populatity
+the RDF Test Cases [<cite><a class="bibref" href="#bib-RDF-TESTCASES">RDF-TESTCASES</a></cite>] document. Due to its popularity
as exchange format the <a href="http://www.w3.org/2011/rdf-wg/">RDF
Working Group</a> decided to publish an updated
-version. This document is intended to become a Working Group Note.
+version. In a change from previous publication, this document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.
<p>
- This document was published by the <a href="http://www.w3.org/2011/rdf-wg/">RDF Working Group</a> as a First Public Working Group Note.
+ This document was published by the <a href="http://www.w3.org/2011/rdf-wg/">RDF Working Group</a> as a Last Call Working Draft.
+
+ This document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.
If you wish to make comments regarding this document, please send them to
@@ -293,23 +252,30 @@
(<a href="mailto:public-rdf-comments-request@w3.org?subject=subscribe">subscribe</a>,
<a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">archives</a>).
-
+ The Last Call period ends 14 October 2013.
- All comments are welcome.
+ All comments are welcome.</p>
+
-
- </p><p>
- Publication as a Working Group Note does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
+ <p>
+ Publication as a Last Call Working Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> 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.
</p>
+ <p>
+ This is a Last Call Working Draft and thus the Working Group has determined that this document has satisfied the
+ relevant technical requirements and is sufficiently stable to advance through the Technical Recommendation process.
+ </p>
+
<p>
This document was produced by a group operating under the
- <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
+ <a id="sotd_patent" about="" rel="w3p:patentRules" href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
@@ -328,19 +294,19 @@
-</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a class="tocxref" href="#sec-introduction"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a class="tocxref" href="#sec-n-triples-language"><span class="secno">2. </span>N-Triples Language</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#simple-triples"><span class="secno">2.1 </span>Simple Triples</a></li><li class="tocline"><a class="tocxref" href="#sec-iri"><span class="secno">2.2 </span>IRIs</a></li><li class="tocline"><a class="tocxref" href="#sec-literals"><span class="secno">2.3 </span>RDF Literals</a></li><li class="tocline"><a class="tocxref" href="#BNodes"><span class="secno">2.4 </span>RDF Blank Nodes</a></li></ul></li><li class="tocline"><a class="tocxref" href="#n-triple-changes"><span class="secno">3. </span>Changes from RDF Test Cases format</a></li><li class="tocline"><a class="tocxref" href="#conformance"><span class="secno">4. </span>Conformance</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#n-triples-mediatype"><span class="secno">4.1 </span>Media Type and Content Encoding</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#sec-other-media-types"><span class="secno">4.1.1 </span>Other Media Types</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#n-triples-grammar"><span class="secno">5. </span>Grammar</a></li><li class="tocline"><a class="tocxref" href="#sec-parsing"><span class="secno">6. </span>Parsing</a></li><li class="tocline"><a class="tocxref" href="#sec-diff-turtle"><span class="secno">A. </span>Summary of diffrences in N-Triples and Turtle</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#sec-triples"><span class="secno">A.1 </span>Triples</a></li><li class="tocline"><a class="tocxref" href="#iri-summary"><span class="secno">A.2 </span>IRI Representations</a></li><li class="tocline"><a class="tocxref" href="#literal-summary"><span class="secno">A.3 </span>Literal Representations</a></li><li class="tocline"><a class="tocxref" href="#bnode-summary"><span class="secno">A.4 </span>Summary of Blank Node Representations in N-Triples and Turtle</a></li></ul></li><li class="tocline"><a class="tocxref" href="#sec-mediaReg-n-triples"><span class="secno">B. </span>N-Triples Internet Media Type, File Extension and Macintosh File Type </a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><span class="secno">C.1 </span>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><span class="secno">C.2 </span>Informative references</a></li></ul></li></ul></section>
+</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#sec-introduction" class="tocxref"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a href="#sec-n-triples-language" class="tocxref"><span class="secno">2. </span>N-Triples Language</a><ul class="toc"><li class="tocline"><a href="#simple-triples" class="tocxref"><span class="secno">2.1 </span>Simple Triples</a></li><li class="tocline"><a href="#sec-iri" class="tocxref"><span class="secno">2.2 </span>IRIs</a></li><li class="tocline"><a href="#sec-literals" class="tocxref"><span class="secno">2.3 </span>RDF Literals</a></li><li class="tocline"><a href="#BNodes" class="tocxref"><span class="secno">2.4 </span>RDF Blank Nodes</a></li></ul></li><li class="tocline"><a href="#n-triple-changes" class="tocxref"><span class="secno">3. </span>Changes from RDF Test Cases format</a></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">4. </span>Conformance</a><ul class="toc"><li class="tocline"><a href="#n-triples-mediatype" class="tocxref"><span class="secno">4.1 </span>Media Type and Content Encoding</a><ul class="toc"><li class="tocline"><a href="#sec-other-media-types" class="tocxref"><span class="secno">4.1.1 </span>Other Media Types</a></li></ul></li></ul></li><li class="tocline"><a href="#n-triples-grammar" class="tocxref"><span class="secno">5. </span>Grammar</a></li><li class="tocline"><a href="#sec-parsing" class="tocxref"><span class="secno">6. </span>Parsing</a><ul class="toc"><li class="tocline"><a href="#sec-parsing-terms" class="tocxref"><span class="secno">6.1 </span>RDF Term Constructors</a></li><li class="tocline"><a href="#rdf-triple-construction" class="tocxref"><span class="secno">6.2 </span>RDF Triple Construction</a></li></ul></li><li class="tocline"><a href="#sec-mediaReg-n-triples" class="tocxref"><span class="secno">A. </span>N-Triples Internet Media Type, File Extension and Macintosh File Type </a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></section>
<!-- BEGIN N-TRIPLES SPEC -->
- <section id="sec-introduction">
+ <section id="sec-introduction" typeof="bibo:Chapter" resource="#sec-introduction" rel="bibo:chapter">
<!--OddPage--><h2><span class="secno">1. </span>Introduction</h2>
<p>This document defines an easy to parse line-based subset of
- Turtle [<cite><a href="#bib-TURTLE-TR" class="bibref">TURTLE-TR</a></cite>] named N-Triples.</p>
- <p>The syntax is a revised version of N-Triples as originally defined in the RDF Test Cases [<cite><a href="#bib-RDF-TESTCASES" class="bibref">RDF-TESTCASES</a></cite>] document. Its original intent was for writing test cases, but it has proven to be popular as a exchange format for RDF data.</p>
+ Turtle [<cite><a class="bibref" href="#bib-turtle">turtle</a></cite>] named N-Triples.</p>
+ <p>The syntax is a revised version of N-Triples as originally defined in the RDF Test Cases [<cite><a class="bibref" href="#bib-RDF-TESTCASES">RDF-TESTCASES</a></cite>] document. Its original intent was for writing test cases, but it has proven to be popular as a exchange format for RDF data.</p>
<p>An N-Triples document contains no parsing directives.
</p>
- <p>N-Triples triples are a sequence of RDF terms representing the subject, predicate and object of an RDF Triple. These may be seperated by white space (spaces <code>#x20</code> or tabs <code>#x9</code>). This sequence is terminated by a '<code>.</code>' and a new line (optional at the end of a document).
+ <p>N-Triples triples are a sequence of RDF terms representing the subject, predicate and object of an RDF Triple. These may be seperated by white space (spaces <code>U+0020</code> or tabs <code>U+0009</code>). This sequence is terminated by a '<code>.</code>' and a new line (optional at the end of a document).
</p>
<div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example"><script type="application/n-triples"><http://one.example/subject1> <http://one.example/predicate1> <http://one.example/object1> . # comments here
@@ -350,29 +316,29 @@
</script></pre></div>
<p>
- N-Triples triples are also Turtle <a href="#simple-triples">simple triples</a>, but Turtle includes other representations of RDF terms and <a href="http://www.w3.org/TR/turtle/#predicate-lists">abbreviations of RDF Triples</a>. When parsed by a Turtle parser, data in the N-Triples format will produce exactly the same triples as a parser for the restricted N-triples language.
+ N-Triples triples are also Turtle <a href="#simple-triples">simple triples</a>, but Turtle includes other representations of RDF terms and <a href="http://www.w3.org/TR/turtle/#predicate-lists">abbreviations of RDF Triples</a>. When parsed by a Turtle parser, data in the N-Triples format will produce exactly the same triples as a parser for the N-triples language.
</p>
<p>The RDF graph represented by an N-Triples document contains
exactly each triple matching the N-Triples <a href="#grammar-production-triple"><code>triple</code></a>
production.
</p></section>
- <section id="sec-n-triples-language">
+ <section id="sec-n-triples-language" typeof="bibo:Chapter" resource="#sec-n-triples-language" rel="bibo:chapter">
<!--OddPage--><h2><span class="secno">2. </span>N-Triples Language</h2>
- <section id="simple-triples">
+ <section id="simple-triples" typeof="bibo:Chapter" resource="#simple-triples" rel="bibo:chapter">
<h3><span class="secno">2.1 </span>Simple Triples</h3>
<p>The simplest triple statement is a sequence of (subject, predicate, object) terms, separated by whitespace and terminated by '<code>.</code>' after each triple.</p>
<div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example"><script type="application/n-triples"><http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> .</script></pre></div>
</section>
- <section id="sec-iri">
+ <section id="sec-iri" typeof="bibo:Chapter" resource="#sec-iri" rel="bibo:chapter">
<h3><span class="secno">2.2 </span>IRIs</h3>
<p>
<a href="http://www.w3.org/TR/rdf11-concepts/#dfn-iri">IRIs</a> may be written only as absolute IRIs.
- IRIs are enclosed in '<' and '>' and may contain numeric escape sequences (described below). For example <code><http://example.org/#green-goblin></code>.
+ IRIs are enclosed in '<code><</code>' and '<code>></code>' and may contain numeric escape sequences (described below). For example <code><http://example.org/#green-goblin></code>.
</p>
</section>
- <section id="sec-literals">
+ <section id="sec-literals" typeof="bibo:Chapter" resource="#sec-literals" rel="bibo:chapter">
<h3><span class="secno">2.3 </span>RDF Literals</h3>
<p><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-literal">Literals</a>
@@ -384,23 +350,28 @@
Literals (Grammar production <a href="#grammar-production-literal">Literal</a>) have a lexical form followed by a language tag, a datatype IRI, or neither.
The representation of the lexical form consists of an
initial delimiter <code>"</code> (<span class="codepoint">U+0022</span>), a sequence of permitted
- characters or numeric escape sequence or string escape sequence, and a final delimiter. Literals may not contain the characters <code>"</code>, <code title="LINE FEED"><sub>LF</sub></code>, or <code title="CARRIAGE RETURN"><sub>CR</sub></code>. In addition '<code>\</code>' (<span class="codepoint">U+005C</span>) may not appear in any quoted literal except as part of an escape sequence.
+ characters or numeric escape sequence or string escape sequence, and a final delimiter. Literals may not contain the characters <code>"</code>, <code title="LINE FEED"><sub>LF</sub></code>, <code title="CARRIAGE RETURN"><sub>CR</sub></code> except in their escaped forms. In addition '<code>\</code>' (<span class="codepoint">U+005C</span>) may not appear in any quoted literal except as part of an escape sequence.
The corresponding <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form">RDF lexical form</a> is the characters between the delimiters, after processing any escape sequences.
If present, the <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-language-tagged-string">language tag</a> is preceded by a '<code>@</code>' (<span class="codepoint">U+0040</span>).
- If there is no language tag, there may be a <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri">datatype IRI</a>, preceeded by '<code>^^</code>' (<span class="codepoint">U+005E</span> <span class="codepoint">U+005E</span>). If there is no datatype IRI and no language tag, the datatype is <code>xsd:string</code>.
+ If there is no language tag, there may be a <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri">datatype IRI</a>, preceeded by '<code>^^</code>' (<span class="codepoint">U+005E</span> <span class="codepoint">U+005E</span>). If there is no datatype IRI and no language tag it is a <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-simple-literal">simple literal</a> and the datatype is <code>http://www.w3.org/2001/XMLSchema#string</code>.
</p>
- <div class="issue"><div class="issue-title"><span>Issue 1</span></div><p class="">
- Include examples with a few escapes for new lines, etc
- </p></div>
+ <div class="example"><div class="example-title"><span>Example 3</span></div><pre class="example"><script type="application/n-triples"><http://example.org/show/218> <http://www.w3.org/2000/01/rdf-schema#label> "That Seventies Show"^^<http://www.w3.org/2001/XMLSchema#string> . # literal with XML Schema string datatype
+<http://example.org/show/218> <http://www.w3.org/2000/01/rdf-schema#label> "That Seventies Show" . # same as above
+<http://example.org/show/218> <http://example.org/show/localName> "That Seventies Show"@en . # literal with a language tag
+<http://example.org/show/218> <http://example.org/show/localName> "Cette Série des Années Septante"@fr-be . # literal outside of ASCII range with a region subtag
+<http://example.org/#spiderman> <http://example.org/text> "This is a multi-line\nliteral with many quotes (\"\"\"\"\")\nand two apostrophes ('')." .
+<http://en.wikipedia.org/wiki/Helium> <http://example.org/elements/atomicNumber> "2"^^<http://www.w3.org/2001/XMLSchema#integer> . # xsd:integer
+<http://en.wikipedia.org/wiki/Helium> <http://example.org/elements/specificGravity> "1.663E-4"^^<http://www.w3.org/2001/XMLSchema#double> . # xsd:double
+</script></pre></div>
</section>
- <section id="BNodes">
+ <section id="BNodes" typeof="bibo:Chapter" resource="#BNodes" rel="bibo:chapter">
<h3><span class="secno">2.4 </span>RDF Blank Nodes</h3>
<p>
<a href="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node">RDF blank nodes</a> in N-Triples are expressed as <code>_:</code> followed by a blank node label which is a series of name characters.
The characters in the label are built upon <a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a>, liberalized as follows:
</p>
<ul>
- <li>The characters <code>_</code> and digits may appear anywhere in a blank node label.</li>
+ <li>The characters <code>_</code> and <code>[0-9]</code> may appear anywhere in a blank node label.</li>
<li>The character <code>.</code> may appear anywhere except the first or last character.</li>
<li>The characters <code>-</code>, <code>U+00B7</code>, <code>U+0300</code> to <code>U+036F</code> and <code>U+203F</code> to <code>U+2040</code> are permitted anywhere except the first character.</li>
</ul>
@@ -408,13 +379,13 @@
A fresh RDF blank node is allocated for each unique blank node label in a document.
Repeated use of the same blank node label identifies the same RDF blank node.
</p>
- <div class="example"><div class="example-title"><span>Example 3</span></div><pre class="example"><script type="application/n-triples">_:alice <http://xmlns.com/foaf/0.1/knows> _:bob .
+ <div class="example"><div class="example-title"><span>Example 4</span></div><pre class="example"><script type="application/n-triples">_:alice <http://xmlns.com/foaf/0.1/knows> _:bob .
_:bob <http://xmlns.com/foaf/0.1/knows> _:alice .</script></pre></div>
</section>
</section>
- <section id="n-triple-changes" class="informative">
+ <section id="n-triple-changes" class="informative" typeof="bibo:Chapter" resource="#n-triple-changes" rel="bibo:chapter">
<!--OddPage--><h2><span class="secno">3. </span>Changes from RDF Test Cases format</h2><p><em>This section is non-normative.</em></p>
<ul>
<li>Encoding is UTF-8 rather than US-ASCII
@@ -424,35 +395,44 @@
</li><li>Comments may occur after a triple production
</li><li>Allows <code>\b</code> and <code>\f</code> for backspace and form feed
</li><li>More than one way to represent a single character
+ </li><li>Blank node labels may start with a digit
</li></ul>
</section>
- <section id="conformance"><!--OddPage--><h2><span class="secno">4. </span>Conformance</h2>
+ <section id="conformance" typeof="bibo:Chapter" resource="#conformance" rel="bibo:chapter"><!--OddPage--><h2><span class="secno">4. </span>Conformance</h2>
<p>
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples,
and notes in this specification are non-normative. Everything else in this specification is
normative.
</p>
<p>
- The key words <em title="MUST" class="rfc2119">MUST</em>, <em title="MUST NOT" class="rfc2119">MUST NOT</em>, <em title="REQUIRED" class="rfc2119">REQUIRED</em>, <em title="SHOULD" class="rfc2119">SHOULD</em>, <em title="SHOULD NOT" class="rfc2119">SHOULD NOT</em>, <em title="RECOMMENDED" class="rfc2119">RECOMMENDED</em>, <em title="MAY" class="rfc2119">MAY</em>,
- and <em title="OPTIONAL" class="rfc2119">OPTIONAL</em> in this specification are to be interpreted as described in [<cite><a href="#bib-RFC2119" class="bibref">RFC2119</a></cite>].
+ The key words <em class="rfc2119" title="MUST">MUST</em>, <em class="rfc2119" title="MUST NOT">MUST NOT</em>, <em class="rfc2119" title="REQUIRED">REQUIRED</em>, <em class="rfc2119" title="SHOULD">SHOULD</em>, <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em>, <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em>, <em class="rfc2119" title="MAY">MAY</em>,
+ and <em class="rfc2119" title="OPTIONAL">OPTIONAL</em> in this specification are to be interpreted as described in [<cite><a class="bibref" href="#bib-RFC2119">RFC2119</a></cite>].
</p>
<p>This specification defines conformance criteria for:</p>
<ul>
<li>N-Triple documents
+ </li><li>Canonical N-Triple documents
</li><li>N-Triple parsers
- </li><li>N-Triple seralizers
</li></ul>
- <p>A conforming <strong>N-Triple document</strong> is a Unicode string that conforms to the grammar and additional constraints defined in <a href="#n-triples-grammar" class="sectionRef sec-ref">section 5. Grammar</a>, starting with the <a href="#grammar-production-ntriplesDoc"><code>ntriplesDoc</code> production</a>. A N-Triple document serializes an RDF graph.</p>
+ <p>A conforming <dfn id="dfn-n-triple-document">N-Triple document</dfn> is a Unicode string that conforms to the grammar and additional constraints defined in <a href="#n-triples-grammar" class="sectionRef sec-ref">section 5. Grammar</a>, starting with the <a href="#grammar-production-ntriplesDoc"><code>ntriplesDoc</code> production</a>. A N-Triple document serializes an RDF graph.</p>
- <p>A conforming <strong>N-Triple parser</strong> is a system capable of reading N-Triple documents on behalf of an application. It makes the serialized RDF graph, as defined in <a href="#sec-parsing" class="sectionRef sec-ref">section 6. Parsing</a>, available to the application, usually through some form of API.</p>
+ <p>A <dfn id="dfn-canonical-n-triple-document">canonical N-Triple document</dfn> is a <strong>N-Triple document</strong> with additional constraints:</p><p>
- <div class="issue"><div class="issue-title"><span>Issue 2</span></div><p class="">N-Triple seralizers are not defined here, will likely include optional behavior to conform to RDF Test Cases syntax as well.</p></div>
+ </p><ul>
+ <li>Whitespace following <code>subject</code>, <code>predicate</code>, and <code>object</code> <em class="rfc2119" title="MUST">MUST</em> be a single space, (<code>U+0020</code>) all other locations that allow whitespace <em class="rfc2119" title="MUST">MUST</em> be empty.
+ </li><li>All comments <em class="rfc2119" title="MUST">MUST</em> be removed.
+ </li><li><code>HEX</code> <em class="rfc2119" title="MUST">MUST</em> use only uppercase letters (<code>[A-F]</code>).
+ </li><li>Characters not allowed directly in STRING_LITERAL_QUOTE (<code>U+0022</code>, <code>U+005C</code>, <code>U+000A</code>, <code>U+000D</code>) <em class="rfc2119" title="MUST">MUST</em> use <code>ECHAR</code> not <code>UCHAR</code>.
+ </li><li>Characters <em class="rfc2119" title="MUST">MUST</em> be represented directly and not by <code>UCHAR</code>.
+ </li></ul>
+
+ <p>A conforming <dfn id="dfn-n-triple-parser">N-Triple parser</dfn> is a system capable of reading N-Triple documents on behalf of an application. It makes the serialized RDF graph, as defined in <a href="#sec-parsing" class="sectionRef sec-ref">section 6. Parsing</a>, available to the application, usually through some form of API.</p>
<p>The IRI that identifies the N-Triple language is: <code>http://www.w3.org/ns/formats/N-Triple</code></p>
- <section id="n-triples-mediatype">
+ <section id="n-triples-mediatype" typeof="bibo:Chapter" resource="#n-triples-mediatype" rel="bibo:chapter">
<h3><span class="secno">4.1 </span>Media Type and Content Encoding</h3>
<p>The media type of N-Triples is <code>application/n-triples</code>.
@@ -461,22 +441,23 @@
registration form.
</p>
- <section id="sec-other-media-types">
+ <section id="sec-other-media-types" typeof="bibo:Chapter" resource="#sec-other-media-types" rel="bibo:chapter">
<h4><span class="secno">4.1.1 </span>Other Media Types</h4>
- <p>N-Triples has been historically provided with other media types. N-Triples may also be provided as <code>text/plain</code>. When used in this way N-Triples <em title="MUST" class="rfc2119">MUST</em> use the escaped form of any character outside US-ASCII. As N-Triples is a subset of Turtle a N-Triples document <em title="MAY" class="rfc2119">MAY</em> also be provided as <code>text/turtle</code>. In both of these cases the document is not an N-Triples document as an N-Triples document is only provided as <code>application/n-triples</code>.</p>
+ <p>N-Triples has been historically provided with other media types. N-Triples may also be provided as <code>text/plain</code>. When used in this way N-Triples <em class="rfc2119" title="MUST">MUST</em> use the escaped form of any character outside US-ASCII. As N-Triples is a subset of Turtle a N-Triples document <em class="rfc2119" title="MAY">MAY</em> also be provided as <code>text/turtle</code>. In both of these cases the document is not an N-Triples document as an N-Triples document is only provided as <code>application/n-triples</code>.</p>
</section>
</section>
</section>
- <section id="n-triples-grammar">
+ <section id="n-triples-grammar" typeof="bibo:Chapter" resource="#n-triples-grammar" rel="bibo:chapter">
<!--OddPage--><h2><span class="secno">5. </span>Grammar</h2>
- <p>A N-Triples document is a Unicode [<cite><a href="#bib-UNICODE" class="bibref">UNICODE</a></cite>] character string encoded in UTF-8.
+ <p>A N-Triples document is a Unicode [<cite><a class="bibref" href="#bib-UNICODE">UNICODE</a></cite>] character string encoded in UTF-8.
Unicode codepoints only in the range U+0 to U+10FFFF inclusive are allowed.</p>
+ <p>Comments in N-Triples take the form of '<code>#</code>', outside an <code>IRIREF</code> or <code>STRING_LITERAL_QUOTE</code>, and continue to the end of line (<code>EOL</code>) or end of file if there is no end of line after the comment marker. Comments are treated as white space.</p>
<p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
- [<cite><a href="#bib-EBNF-NOTATION" class="bibref">EBNF-NOTATION</a></cite>].</p>
+ [<cite><a class="bibref" href="#bib-EBNF-NOTATION">EBNF-NOTATION</a></cite>].</p>
<p>Escape sequence rules are the same as Turtle
- [<cite><a href="#bib-TURTLE-TR" class="bibref">TURTLE-TR</a></cite>]. However, as only the <a href="#grammar-production-STRING_LITERAL_QUOTE"><code>STRING_LITERAL_QUOTE</code></a> production is allowed new lines in literals <em title="MUST" class="rfc2119">MUST</em> be escaped.</p>
+ [<cite><a class="bibref" href="#bib-turtle">turtle</a></cite>]. However, as only the <a href="#grammar-production-STRING_LITERAL_QUOTE"><code>STRING_LITERAL_QUOTE</code></a> production is allowed new lines in literals <em class="rfc2119" title="MUST">MUST</em> be escaped.</p>
<div><table class="grammar">
<tbody class="grammar-productions">
<tr id="grammar-production-ntriplesDoc" data-grammar-original="[1] ntriplesDoc ::= triple? (EOL triple)* EOL?" data-grammar-expression="(',', [('?', ('id', 'triple')), ('*', (',', [('id', 'EOL'), ('id', 'triple')])), ('?', ('id', 'EOL'))])">
@@ -515,33 +496,33 @@
<td>::=</td>
<td><a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a> ('<code class="grammar-literal">^^</code>' <a href="#grammar-production-IRIREF">IRIREF</a> <code>| </code> '<code class="grammar-literal">@</code>' <a href="#grammar-production-LANG">LANG</a>)?</td>
</tr>
-<tr><td colspan="4"><h2 id="terminals">Productions for terminals</h2></td></tr>
- <tr id="grammar-production-LANG" data-grammar-original="[7] LANG ::= [a-zA-Z]+ ( "-" [a-zA-Z0-9]+ )*" data-grammar-expression="(',', [('+', ('[', 'a-zA-Z')), ('*', (',', [("'", '-'), ('+', ('[', 'a-zA-Z0-9'))]))])" class="grammar-token">
+<tr><td colspan="5"><h2 id="terminals">Productions for terminals</h2></td></tr>
+ <tr id="grammar-production-LANGTAG" data-grammar-original="[144s] LANGTAG ::= "@" [a-zA-Z]+ ( "-" [a-zA-Z0-9]+ )*" data-grammar-expression="(',', [("'", '@'), ('+', ('[', 'a-zA-Z')), ('*', (',', [("'", '-'), ('+', ('[', 'a-zA-Z0-9'))]))])" class="grammar-token">
+ <td>[144s]</td>
+ <td><code>LANGTAG</code></td>
+ <td>::=</td>
+ <td>'<code class="grammar-literal">@</code>' [<code class="grammar-chars">a-zA-Z</code>]<code class="grammar-plus">+</code> ('<code class="grammar-literal">-</code>' [<code class="grammar-chars">a-zA-Z0-9</code>]<code class="grammar-plus">+</code>)<code class="grammar-star">*</code></td>
+</tr>
+ <tr id="grammar-production-EOL" data-grammar-original="[7] EOL ::= [#xD#xA]+" data-grammar-expression="('+', ('[', '#xD#xA'))" class="grammar-token">
<td>[7]</td>
- <td><code>LANG</code></td>
- <td>::=</td>
- <td>[<code class="grammar-chars">a-zA-Z</code>]<code class="grammar-plus">+</code> ('<code class="grammar-literal">-</code>' [<code class="grammar-chars">a-zA-Z0-9</code>]<code class="grammar-plus">+</code>)<code class="grammar-star">*</code></td>
-</tr>
- <tr id="grammar-production-EOL" data-grammar-original="[8] EOL ::= [#xD#xA]+" data-grammar-expression="('+', ('[', '#xD#xA'))" class="grammar-token">
- <td>[8]</td>
<td><code>EOL</code></td>
<td>::=</td>
<td>[<code class="grammar-chars">#xD#xA</code>]<code class="grammar-plus">+</code></td>
</tr>
- <tr id="grammar-production-WS" data-grammar-original="[9] WS ::= [#x20#x9]" data-grammar-expression="('[', '#x20#x9')" class="grammar-token">
- <td>[9]</td>
+ <tr id="grammar-production-WS" data-grammar-original="[8] WS ::= [#x20#x9]" data-grammar-expression="('[', '#x20#x9')" class="grammar-token">
+ <td>[8]</td>
<td><code>WS</code></td>
<td>::=</td>
<td>[<code class="grammar-chars">#x20#x9</code>]</td>
</tr>
- <tr id="grammar-production-IRIREF" data-grammar-original="[10] IRIREF ::= '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'" data-grammar-expression="(',', [("'", '<'), ('*', ('|', [('[', '^#x00-#x20<>"{}|^`\\'), ('id', 'UCHAR')])), ("'", '>')])" class="grammar-token">
- <td>[10]</td>
+ <tr id="grammar-production-IRIREF" data-grammar-original="[9] IRIREF ::= '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'" data-grammar-expression="(',', [("'", '<'), ('*', ('|', [('[', '^#x00-#x20<>"{}|^`\\'), ('id', 'UCHAR')])), ("'", '>')])" class="grammar-token">
+ <td>[9]</td>
<td><code>IRIREF</code></td>
<td>::=</td>
<td>'<code class="grammar-literal"><</code>' ([<code class="grammar-chars">^#x00-#x20<>"{}|^`\</code>] <code>| </code> <a href="#grammar-production-UCHAR">UCHAR</a>)<code class="grammar-star">*</code> '<code class="grammar-literal">></code>'</td>
</tr>
- <tr id="grammar-production-STRING_LITERAL_QUOTE" data-grammar-original="[11] STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"'" data-grammar-expression="(',', [("'", '"'), ('*', ('|', [('[', '^#x22#x5C#xA#xD'), ('id', 'ECHAR'), ('id', 'UCHAR')])), ("'", '"')])" class="grammar-token">
- <td>[11]</td>
+ <tr id="grammar-production-STRING_LITERAL_QUOTE" data-grammar-original="[10] STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"'" data-grammar-expression="(',', [("'", '"'), ('*', ('|', [('[', '^#x22#x5C#xA#xD'), ('id', 'ECHAR'), ('id', 'UCHAR')])), ("'", '"')])" class="grammar-token">
+ <td>[10]</td>
<td><code>STRING_LITERAL_QUOTE</code></td>
<td>::=</td>
<td>'<code class="grammar-literal">"</code>' ([<code class="grammar-chars">^#x22#x5C#xA#xD</code>] <code>| </code> <a href="#grammar-production-ECHAR">ECHAR</a> <code>| </code> <a href="#grammar-production-UCHAR">UCHAR</a>)<code class="grammar-star">*</code> '<code class="grammar-literal">"</code>'</td>
@@ -552,8 +533,8 @@
<td>::=</td>
<td>'<code class="grammar-literal">_:</code>' (<a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code>| </code> [<code class="grammar-chars">0-9</code>]) ((<a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>| </code> '<code class="grammar-literal">.</code>')<code class="grammar-star">*</code> <a href="#grammar-production-PN_CHARS">PN_CHARS</a>)?</td>
</tr>
- <tr id="grammar-production-UCHAR" data-grammar-original="[12] UCHAR ::= ( "\u" HEX HEX HEX HEX )| ( "\U" HEX HEX HEX HEX HEX HEX HEX HEX )" data-grammar-expression="('|', [(',', [("'", '\\u'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX')]), (',', [("'", '\\U'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX')])])" class="grammar-token">
- <td>[12]</td>
+ <tr id="grammar-production-UCHAR" data-grammar-original="[11] UCHAR ::= ( "\u" HEX HEX HEX HEX )| ( "\U" HEX HEX HEX HEX HEX HEX HEX HEX )" data-grammar-expression="('|', [(',', [("'", '\\u'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX')]), (',', [("'", '\\U'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX')])])" class="grammar-token">
+ <td>[11]</td>
<td><code>UCHAR</code></td>
<td>::=</td>
<td>'<code class="grammar-literal">\u</code>' <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <code>| </code> '<code class="grammar-literal">\U</code>' <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a></td>
@@ -591,151 +572,40 @@
</tbody></table>
</div>
</section>
- <section id="sec-parsing">
- <!--OddPage--><h2><span class="secno">6. </span>Parsing</h2>
- <div class="issue"><div class="issue-title"><span>Issue 3</span></div><p class="">It may be simple, but should still be defined.</p></div>
- </section>
-
- <section id="sec-diff-turtle" class="appendix informative">
- <!--OddPage--><h2><span class="secno">A. </span>Summary of diffrences in N-Triples and Turtle</h2><p><em>This section is non-normative.</em></p>
- <section id="sec-triples">
- <h3><span class="secno">A.1 </span>Triples</h3><p><em>This section is non-normative.</em></p>
- <p>N-Triples only allows for <a href="#simple-triples">simple triple</a> statements which <em title="MUST NOT" class="rfc2119">MUST NOT</em> contain new lines. A single triple is always a single line of the document.</p>
- </section>
- <section id="iri-summary">
- <h3><span class="secno">A.2 </span>IRI Representations</h3>
- <table id="term2escape1" class="separated" style="border-collapse:collapse;margin: 2em;">
- <thead>
- <tr>
- <th></th>
- <th>Turtle</th>
- <th>N-Triples</th>
- <th>example</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="r">absolute IRI</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td><code><http://a.example/some/path/></code></td>
- </tr>
- <tr>
- <td class="r">relative IRI</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code></some/path/></code></td>
- </tr>
- <tr>
- <td class="r">prefixed name</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code>rdfs:label</code></td>
- </tr>
- <tr>
- <td class="r"><code>a</code> for the predicate <code>rdf:type</code></td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code>a</code></td>
- </tr>
- </tbody>
- </table>
+ <section id="sec-parsing" typeof="bibo:Chapter" resource="#sec-parsing" rel="bibo:chapter">
+ <!--OddPage--><h2><span class="secno">6. </span>Parsing</h2>
+ <p>Parsing N-Triples requires a state of one item:</p>
+ <ul>
+ <li id="bnodeLabels">Map[<a class="type string">string</a> -> <a href="../rdf-concepts/index.html#dfn-blank-node">blank node</a>] <code class="dfn">bnodeLabels</code> — A mapping from string to blank node.</li>
+ </ul>
+
+ <section id="sec-parsing-terms" typeof="bibo:Chapter" resource="#sec-parsing-terms" rel="bibo:chapter">
+ <h3><span class="secno">6.1 </span>RDF Term Constructors</h3>
+ <p>This table maps productions and lexical tokens to <code>RDF terms</code> or components of <code>RDF terms</code> listed in <a href="#sec-parsing" class="sectionRef sec-ref">section 6. Parsing</a>:</p>
+ <table class="simple">
+ <thead>
+ <tr><th>production</th><th>type</th><th>procedure</th></tr>
+ </thead>
+ <tbody>
+ <tr id="handle-IRIREF"><td style="text-align:left;"><a class="type IRI" href="#grammar-production-IRIREF">IRIREF </a></td><td><a href="../rdf-concepts/index.html#dfn-iri"> IRI </a></td><td>The characters between "<" and ">" are taken, with the <a href="#numeric">numeric escape sequences</a> unescaped, to form the unicode string of the IRI.</td></tr>
+ <tr id="handle-STRING_LITERAL_QUOTE"><td style="text-align:left;"><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE </a></td><td><a href="../rdf-concepts/index.html#dfn-lexical-form"> lexical form</a></td><td>The characters between the outermost '"'s are taken, with <a href="#numeric">numeric</a> and <a href="#string">string</a> escape sequences unescaped, to form the unicode string of a lexical form.</td></tr>
+ <tr id="handle-LANGTAG"><td style="text-align:left;"><a class="type langTag" href="#grammar-production-LANGTAG">LANGTAG </a></td><td><a href="../rdf-concepts/index.html#dfn-language-tag">language tag</a></td><td>The characters following the <code>@</code> form the unicode string of the language tag.</td></tr>
+ <tr id="handle-literal"><td style="text-align:left;"><a class="type literal" href="#grammar-production-literal">literal </a></td><td><a href="../rdf-concepts/index.html#dfn-literal"> literal </a></td><td>The literal has a lexical form of the first rule argument, <code> STRING_LITERAL_QUOTE</code>, and either a language tag of <code>LANGTAG</code> or a datatype IRI of <code>iri</code>, depending on which rule matched the input. if neither a language tag nor a datatype IRI is provided, the literal has a datatype of <code>xsd:string</code>.</td></tr>
+ <tr id="handle-BLANK_NODE_LABEL"><td style="text-align:left;"><a class="type bNode" href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL </a></td><td><a href="../rdf-concepts/index.html#dfn-blank-node"> blank node </a></td><td>The string after '<code>_:</code>', is a key in <a href="#bnodeLabels">bnodeLabels</a>. If there is no corresponding blank node in the map, one is allocated.</td></tr>
+ </tbody>
+ </table>
+ </section>
+ <section id="rdf-triple-construction">
+ <h3><span class="secno">6.2 </span>RDF Triple Construction</h3>
+ <p>A N-Triple document defines an RDF graphs composed of a set of RDF triples. The <code><a href="#grammar-production-triple">triple</a></code> production produces a triple defined by the terms constructed for <code><a href="#grammar-production-subject">subject</a></code>, <code><a href="#grammar-production-predicate">predicate</a></code> and <code><a href="#grammar-production-object">object</a></code>.
+ </p></section>
+
+
</section>
- <section id="literal-summary">
- <h3><span class="secno">A.3 </span>Literal Representations</h3>
-
- <table id="term2escape2" class="separated" style="border-collapse:collapse;margin: 2em;">
- <thead>
- <tr>
- <th></th>
- <th>Turtle</th>
- <th>N-Triples</th>
- <th>example</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="r">single-quoted single-line lexical representation</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code>'some literal'</code></td>
- </tr>
- <tr>
- <td class="r">double-quoted single-line lexical representation</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td><code>"some literal"</code></td>
- </tr>
- <tr>
- <td class="r">single-quoted multi-line lexical representation</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code>'''some<br>literal'''</code></td>
- </tr>
- <tr>
- <td class="r">double-quoted multi-line lexical representation</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code>"""some<br>literal"""</code></td>
- </tr>
- <tr>
- <td class="r">abbreviated numeric</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code>13</code></td>
- </tr>
- <tr>
- <td class="r">abbreviated boolean</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code>true</code></td>
- </tr>
- </tbody>
- </table>
- </section>
- <section id="bnode-summary">
- <h3><span class="secno">A.4 </span>Summary of Blank Node Representations in N-Triples and Turtle</h3>
-
- <table id="term2escape3" class="separated" style="border-collapse:collapse;margin: 2em;">
- <thead>
- <tr>
- <th></th>
- <th>Turtle</th>
- <th>N-Triples</th>
- <th>example</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="r">labeled blank node</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td><code><http://a.example/who#Alice> <http://xmlns.com/foaf/0.1/knows> _:bob .</code></td>
- </tr>
- <tr>
- <td class="r">anonymous node</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code><http://a.example/who#Alice> foaf:knows [] .</code></td>
- </tr>
- <tr>
- <td class="r">blank node property list</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td><code><http://a.example/who#Alice> foaf:knows [ foaf:name "Bob" ] .</code></td>
- </tr>
- </tbody>
- </table>
- </section>
- </section>
-
-
-<!-- END N-TRIPLES SPEC -->
-
- <section id="sec-mediaReg-n-triples" class="appendix">
- <!--OddPage--><h2><span class="secno">B. </span>N-Triples Internet Media Type, File Extension and Macintosh File Type </h2>
+ <section id="sec-mediaReg-n-triples" class="appendix" typeof="bibo:Chapter" resource="#sec-mediaReg-n-triples" rel="bibo:chapter">
+ <!--OddPage--><h2><span class="secno">A. </span>N-Triples Internet Media Type, File Extension and Macintosh File Type </h2>
<dl>
<dt>Contact:</dt>
<dd>Eric Prud'hommeaux</dd>
@@ -761,16 +631,16 @@
<dd>None</dd>
<dt>Encoding considerations:</dt>
- <dd>The syntax of N-Triples is expressed over code points in Unicode [<cite><a href="#bib-UNICODE" class="bibref">UNICODE</a></cite>]. The encoding is always UTF-8 [<cite><a href="#bib-UTF-8" class="bibref">UTF-8</a></cite>].</dd>
+ <dd>The syntax of N-Triples is expressed over code points in Unicode [<cite><a class="bibref" href="#bib-UNICODE">UNICODE</a></cite>]. The encoding is always UTF-8 [<cite><a class="bibref" href="#bib-UTF-8">UTF-8</a></cite>].</dd>
<dd>Unicode code points may also be expressed using an \uXXXX (U+0 to U+FFFF) or \UXXXXXXXX syntax (for U+10000 onwards) where X is a hexadecimal digit [0-9A-F]</dd>
<dt>Security considerations:</dt>
- <dd>N-Triples is a general-purpose assertion language; applications may evaluate given data to infer more assertions or to dereference IRIs, invoking the security considerations of the scheme for that IRI. Note in particular, the privacy issues in [<cite><a href="#bib-RFC3023" class="bibref">RFC3023</a></cite>] section 10 for HTTP IRIs. Data obtained from an inaccurate or malicious data source may lead to inaccurate or misleading conclusions, as well as the dereferencing of unintended IRIs. Care must be taken to align the trust in consulted resources with the sensitivity of the intended use of the data; inferences of potential medical treatments would likely require different trust than inferences for trip planning.</dd>
+ <dd>N-Triples is a general-purpose assertion language; applications may evaluate given data to infer more assertions or to dereference IRIs, invoking the security considerations of the scheme for that IRI. Note in particular, the privacy issues in [<cite><a class="bibref" href="#bib-RFC3023">RFC3023</a></cite>] section 10 for HTTP IRIs. Data obtained from an inaccurate or malicious data source may lead to inaccurate or misleading conclusions, as well as the dereferencing of unintended IRIs. Care must be taken to align the trust in consulted resources with the sensitivity of the intended use of the data; inferences of potential medical treatments would likely require different trust than inferences for trip planning.</dd>
<dd>N-Triples is used to express arbitrary application data; security considerations will vary by domain of use. Security tools and protocols applicable to text (e.g. PGP encryption, MD5 sum validation, password-protected compression) may also be used on N-Triples documents. Security/privacy protocols must be imposed which reflect the sensitivity of the embedded information.</dd>
- <dd>N-Triples can express data which is presented to the user, for example, RDF Schema labels. Application rendering strings retrieved from untrusted N-Triples documents must ensure that malignant strings may not be used to mislead the reader. The security considerations in the media type registration for XML ([<cite><a href="#bib-RFC3023" class="bibref">RFC3023</a></cite>] section 10) provide additional guidance around the expression of arbitrary data and markup.</dd>
+ <dd>N-Triples can express data which is presented to the user, for example, RDF Schema labels. Application rendering strings retrieved from untrusted N-Triples documents must ensure that malignant strings may not be used to mislead the reader. The security considerations in the media type registration for XML ([<cite><a class="bibref" href="#bib-RFC3023">RFC3023</a></cite>] section 10) provide additional guidance around the expression of arbitrary data and markup.</dd>
<dd>N-Triples uses IRIs as term identifiers. Applications interpreting data expressed in N-Triples should address the security issues of
- <a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource Identifiers (IRIs)</a> [<cite><a href="#bib-RFC3987" class="bibref">RFC3987</a></cite>] Section 8, as well as
- <a class="norm" href="http://www.ietf.org/rfc/rfc3986.txt">Uniform Resource Identifier (URI): Generic Syntax</a> [<cite><a href="#bib-RFC3986" class="bibref">RFC3986</a></cite>] Section 7.</dd>
+ <a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource Identifiers (IRIs)</a> [<cite><a class="bibref" href="#bib-RFC3987">RFC3987</a></cite>] Section 8, as well as
+ <a class="norm" href="http://www.ietf.org/rfc/rfc3986.txt">Uniform Resource Identifier (URI): Generic Syntax</a> [<cite><a class="bibref" href="#bib-RFC3986">RFC3986</a></cite>] Section 7.</dd>
<dd>Multiple IRIs may have the same appearance. Characters in different scripts may
look similar (a Cyrillic "о" may appear similar to a Latin "o"). A character followed
@@ -781,9 +651,9 @@
Any person or application that is writing or interpreting data in Turtle must take care to use the IRI that matches the intended semantics, and avoid IRIs that make look similar.
Further information about matching of similar characters can be found
in <a class="inform" href="http://www.unicode.org/reports/tr36/">Unicode Security
- Considerations</a> [<cite><a href="#bib-UNISEC" class="bibref">UNISEC</a></cite>] and
+ Considerations</a> [<cite><a class="bibref" href="#bib-UNICODE-SECURITY">UNICODE-SECURITY</a></cite>] and
<a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource
- Identifiers (IRIs)</a> [<cite><a href="#bib-RFC3987" class="bibref">RFC3987</a></cite>] Section 8.
+ Identifiers (IRIs)</a> [<cite><a class="bibref" href="#bib-RFC3987">RFC3987</a></cite>] Section 8.
</dd>
<dt>Interoperability considerations:</dt>
@@ -816,14 +686,14 @@
-<section class="appendix" id="references"><!--OddPage--><h2><span class="secno">C. </span>References</h2><section id="normative-references"><h3><span class="secno">C.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-EBNF-NOTATION">[EBNF-NOTATION]</dt><dd>Tim Bray; Jean Paoli; C. M. Sperberg-McQueen; Eve Maler; François Yergeau. <a href="http://www.w3.org/TR/REC-xml/#sec-notation"><cite>EBNF Notation</cite></a> 26 November 2008. W3C Recommendation. URL: <a href="http://www.w3.org/TR/REC-xml/#sec-notation">http://www.w3.org/TR/REC-xml/#sec-notation</a>
-</dd><dt id="bib-RDF-TESTCASES">[RDF-TESTCASES]</dt><dd>Jan Grant; Dave Beckett. <a href="http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/"><cite>RDF Test Cases.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/">http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/</a>
-</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
-</dd><dt id="bib-RFC3023">[RFC3023]</dt><dd>M. Murata; S. St.Laurent; D. Kohn. <a href="http://www.ietf.org/rfc/rfc3023.txt"><cite>XML Media Types</cite></a> January 2001. Internet RFC 3023. URL: <a href="http://www.ietf.org/rfc/rfc3023.txt">http://www.ietf.org/rfc/rfc3023.txt</a>
-</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd>T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a>
-</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a>
-</dd><dt id="bib-TURTLE-TR">[TURTLE-TR]</dt><dd>Eric Prud'hommeaux; Gavin Carothers. <a href="http://www.w3.org/TR/2013/CR-turtle-20130219/"><cite>Turtle: Terse Triple Language</cite></a> 19 February 2013. W3C Candidate Recommendation. URL: <a href="http://www.w3.org/TR/2013/CR-turtle-20130219/">http://www.w3.org/TR/2013/CR-turtle-20130219/</a>
-</dd><dt id="bib-UNICODE">[UNICODE]</dt><dd>The Unicode Consortium. <a href="http://www.unicode.org/standard/versions/enumeratedversions.html"><cite>The Unicode Standard.</cite></a>. Defined by: The Unicode Standard, Version 6.2.0, (Mountain View, CA: The Unicode Consortium, 2012. ISBN 978-1-936213-07-8) , as updated from time to time by the publication of new versions URL: <a href="http://www.unicode.org/standard/versions/enumeratedversions.html">http://www.unicode.org/standard/versions/enumeratedversions.html</a>
-</dd><dt id="bib-UTF-8">[UTF-8]</dt><dd>F. Yergeau. <a href="http://www.ietf.org/rfc/rfc3629.txt"><cite>UTF-8, a transformation format of ISO 10646</cite></a>. IETF RFC 3629. November 2003. URL: <a href="http://www.ietf.org/rfc/rfc3629.txt">http://www.ietf.org/rfc/rfc3629.txt</a>
-</dd></dl></section><section id="informative-references"><h3><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-UNISEC">[UNISEC]</dt><dd>Mark Davis; Michel Suignard. <a href="http://www.unicode.org/reports/tr36/"><cite>Unicode Security Considerations</cite></a> 4 August 2010. URL: <a href="http://www.unicode.org/reports/tr36/">http://www.unicode.org/reports/tr36/</a>
+<section id="references" class="appendix" typeof="bibo:Chapter" resource="#references" rel="bibo:chapter"><!--OddPage--><h2><span class="secno">B. </span>References</h2><section id="normative-references" typeof="bibo:Chapter" resource="#normative-references" rel="bibo:chapter"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography" about=""><dt id="bib-EBNF-NOTATION">[EBNF-NOTATION]</dt><dd rel="dcterms:requires">Tim Bray; Jean Paoli; C. M. Sperberg-McQueen; Eve Maler; François Yergeau. <a href="http://www.w3.org/TR/REC-xml/#sec-notation"><cite>EBNF Notation</cite></a> 26 November 2008. W3C Recommendation. URL: <a href="http://www.w3.org/TR/REC-xml/#sec-notation">http://www.w3.org/TR/REC-xml/#sec-notation</a>
+</dd><dt id="bib-RDF-TESTCASES">[RDF-TESTCASES]</dt><dd rel="dcterms:requires">jan grant; Dave Beckett. <a href="http://www.w3.org/TR/rdf-testcases"><cite>RDF Test Cases</cite></a>. 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/rdf-testcases">http://www.w3.org/TR/rdf-testcases</a>
+</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd rel="dcterms:requires">S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
+</dd><dt id="bib-RFC3023">[RFC3023]</dt><dd rel="dcterms:requires">M. Murata; S. St.Laurent; D. Kohn. <a href="http://www.ietf.org/rfc/rfc3023.txt"><cite>XML Media Types (RFC 3023)</cite></a>. January 2001. RFC. URL: <a href="http://www.ietf.org/rfc/rfc3023.txt">http://www.ietf.org/rfc/rfc3023.txt</a>
+</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd rel="dcterms:requires">T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax (RFC 3986)</cite></a>. January 2005. RFC. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a>
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd rel="dcterms:requires">M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs)</cite></a>. January 2005. RFC. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a>
+</dd><dt id="bib-UNICODE">[UNICODE]</dt><dd rel="dcterms:requires"><a href="http://www.unicode.org/versions/latest/"><cite>The Unicode Standard</cite></a>. URL: <a href="http://www.unicode.org/versions/latest/">http://www.unicode.org/versions/latest/</a>
+</dd><dt id="bib-UTF-8">[UTF-8]</dt><dd rel="dcterms:requires">F. Yergeau. <a href="http://www.ietf.org/rfc/rfc3629.txt"><cite>UTF-8, a transformation format of ISO 10646</cite></a>. IETF RFC 3629. November 2003. URL: <a href="http://www.ietf.org/rfc/rfc3629.txt">http://www.ietf.org/rfc/rfc3629.txt</a>
+</dd><dt id="bib-turtle">[turtle]</dt><dd rel="dcterms:requires">Eric Prud'hommeaux; Gavin Carothers. <a href="http://www.w3.org/TR/turtle/"><cite>Turtle</cite></a>. 19 February 2013. W3C Candidate Recommendation. URL: <a href="http://www.w3.org/TR/turtle/">http://www.w3.org/TR/turtle/</a>
+</dd></dl></section><section id="informative-references" typeof="bibo:Chapter" resource="#informative-references" rel="bibo:chapter"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography" about=""><dt id="bib-UNICODE-SECURITY">[UNICODE-SECURITY]</dt><dd rel="dcterms:references">Mark Davis; Michel Suignard. <a href="http://www.unicode.org/reports/tr36/"><cite>Unicode Security Considerations</cite></a>. URL: <a href="http://www.unicode.org/reports/tr36/">http://www.unicode.org/reports/tr36/</a>
</dd></dl></section></section></body></html>
\ No newline at end of file