--- a/REC-drafts/REC-n-quads-20140225/Overview.html Tue Feb 11 19:53:06 2014 +0100
+++ b/REC-drafts/REC-n-quads-20140225/Overview.html Tue Feb 11 19:55:36 2014 +0100
@@ -0,0 +1,793 @@
+<!DOCTYPE html>
+<html lang="en" dir="ltr" typeof="bibo:Document w3p:REC" about="" property="dcterms:language" content="en" prefix="bibo: http://purl.org/ontology/bibo/ w3p: http://www.w3.org/2001/02pd/rec54#" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>RDF 1.1 N-Quads</title>
+ <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
+
+
+
+ <style type="text/css">
+ /* Style Turtle script blocks to be visible */
+ pre.example script {
+ display:block;
+ overflow-x: auto;
+ }
+ .separated thead tr th { border:1px solid black; padding: .2em; }
+ .separated tbody tr td { border:1px solid black; text-align: center; }
+ .separated tbody tr td.r { text-align: right; padding: .5em; }
+ .grammar td { font-family: monospace;}
+ .grammar-literal { color: gray;}
+ </style>
+ <style>/*****************************************************************
+ * ReSpec 3 CSS
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- INLINES --- */
+em.rfc2119 {
+ text-transform: lowercase;
+ font-variant: small-caps;
+ font-style: normal;
+ color: #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+ border: none;
+}
+
+dfn {
+ font-weight: bold;
+}
+
+a.internalDFN {
+ color: inherit;
+ border-bottom: 1px solid #99c;
+ text-decoration: none;
+}
+
+a.externalDFN {
+ color: inherit;
+ border-bottom: 1px dotted #ccc;
+ text-decoration: none;
+}
+
+a.bibref {
+ text-decoration: none;
+}
+
+cite .bibref {
+ font-style: normal;
+}
+
+code {
+ color: #ff4500;
+}
+
+/* --- TOC --- */
+.toc a, .tof a {
+ text-decoration: none;
+}
+
+a .secno, a .figno {
+ color: #000;
+}
+
+ul.tof, ol.tof {
+ list-style: none outside none;
+}
+
+.caption {
+ margin-top: 0.5em;
+ font-style: italic;
+}
+
+/* --- TABLE --- */
+table.simple {
+ border-spacing: 0;
+ border-collapse: collapse;
+ border-bottom: 3px solid #005a9c;
+}
+
+.simple th {
+ background: #005a9c;
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+}
+
+.simple th[scope="row"] {
+ background: inherit;
+ color: inherit;
+ border-top: 1px solid #ddd;
+}
+
+.simple td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+ background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+ margin-top: 0;
+}
+
+.section dd > p:last-child {
+ margin-bottom: 0;
+}
+
+.section dd {
+ margin-bottom: 1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+ margin-bottom: 0;
+}
+
+@media print {
+ .removeOnSave {
+ display: none;
+ }
+}
+</style><style>/* --- EXAMPLES --- */
+div.example-title {
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.example-title span {
+ text-transform: uppercase;
+}
+aside.example, div.example, div.illegal-example {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+div.illegal-example { color: red }
+div.illegal-example p { color: black }
+aside.example, div.example {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+ border-color: #e0cb52;
+ background: #fcfaee;
+}
+
+aside.example div.example {
+ border-left-width: .1em;
+ border-color: #999;
+ background: #fff;
+}
+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: #2b2; }
+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: 1em 1.2em 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 rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/W3C-REC" />
+<!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]-->
+</head>
+ <body class="h-entry" role="document" id="respecDocument"><div class="head" role="contentinfo" id="respecHeader">
+ <p>
+
+ <a href="http://www.w3.org/"><img width="72" height="48" alt="W3C" src="https://www.w3.org/Icons/w3c_home" /></a>
+
+ </p>
+ <h1 property="dcterms:title" id="title" class="title p-name">RDF 1.1 N-Quads</h1>
+
+ <h2 id="subtitle" property="bibo:subtitle">A line-based syntax for RDF datasets</h2>
+
+ <h2 content="2014-02-24T23:00:00.000Z" datatype="xsd:dateTime" property="dcterms:issued" id="w3c-recommendation-25-february-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Recommendation <time datetime="2014-02-25" class="dt-published">25 February 2014</time></h2>
+ <dl>
+
+ <dt>This version:</dt>
+ <dd><a href="http://www.w3.org/TR/2014/REC-n-quads-20140225/" class="u-url">http://www.w3.org/TR/2014/REC-n-quads-20140225/</a></dd>
+ <dt>Latest published version:</dt>
+ <dd><a href="http://www.w3.org/TR/n-quads/">http://www.w3.org/TR/n-quads/</a></dd>
+
+
+
+
+ <dt>Implementation report:</dt>
+ <dd><a href="http://www.w3.org/TR/2014/NOTE-rdf11-testcases-20140225/">http://www.w3.org/TR/2014/NOTE-rdf11-testcases-20140225/</a></dd>
+
+
+
+
+ <dt>Previous version:</dt>
+ <dd><a href="http://www.w3.org/TR/2014/PR-n-quads-20140109/" rel="dcterms:replaces">http://www.w3.org/TR/2014/PR-n-quads-20140109/</a></dd>
+
+
+ <dt>Editor:</dt>
+ <dd inlist="" rel="bibo:editor" class="p-author h-card vcard"><span typeof="foaf:Person"><span class="p-name fn" property="foaf:name">Gavin Carothers</span>, <a href="https://lexmachina.com/" class="p-org org h-org h-card" rel="foaf:workplaceHomepage">Lex Machina, Inc</a></span>
+</dd>
+
+
+
+ </dl>
+
+ <p>
+ Please check the <a href="http://www.w3.org/2014/rdf1.1-errata"><strong>errata</strong></a> for any errors or issues
+ reported since publication.
+ </p>
+
+
+
+ <p>
+ The English version of this specification is the only normative version. Non-normative
+ <a href="http://www.w3.org/Consortium/Translation/">translations</a> may also be available.
+ </p>
+
+
+
+ <p class="copyright">
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
+ 2012-2014
+
+ <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.
+
+ <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
+
+ <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
+
+ rules apply.
+ </p>
+
+
+ <hr />
+</div>
+ <section id="abstract" class="introductory" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter"><h2 aria-level="1" role="heading" id="h2_abstract">Abstract</h2><p>
+ N-Quads is a line-based, plain text format for encoding an RDF dataset.
+</p></section><section class="introductory" id="sotd" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter"><h2 aria-level="1" role="heading" id="h2_sotd">Status of This Document</h2>
+
+
+
+ <p>
+ <em>This section describes the status of this document at the time of its publication.
+ Other documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the
+ latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports index</a> at
+ http://www.w3.org/TR/.</em>
+ </p>
+
+<p>This document is part of the RDF 1.1 document suit.
+The N-Quads format is a line-based RDF syntax with a similar flavor as N-Triples
+[<cite><a class="bibref" href="#bib-N-TRIPLES">N-TRIPLES</a></cite>]. The main distinction is that N-Quads allows encoding
+multiple graphs. </p>
+
+ <p>
+ This document was published by the <a href="http://www.w3.org/2011/rdf-wg/">RDF Working Group</a> as a Recommendation.
+
+
+ If you wish to make comments regarding this document, please send them to
+ <a href="mailto:public-rdf-comments@w3.org">public-rdf-comments@w3.org</a>
+ (<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>).
+
+
+
+
+ All comments are welcome.
+
+ </p>
+
+ <p>
+ Please see the Working Group's <a href="http://www.w3.org/TR/2014/NOTE-rdf11-testcases-20140225/">implementation
+ report</a>.
+ </p>
+
+
+
+ <p>
+ This document has been reviewed by <abbr title="World Wide Web Consortium">W3C</abbr> Members, by software developers, and by other <abbr title="World Wide Web Consortium">W3C</abbr>
+ groups and interested parties, and is endorsed by the Director as a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.
+ It is a stable document and may be used as reference material or cited from another
+ document. <abbr title="World Wide Web Consortium">W3C</abbr>'s role in making the Recommendation is to draw attention to the
+ specification and to promote its widespread deployment. This enhances the functionality
+ and interoperability of the Web.
+ </p>
+
+
+ <p>
+
+ This document was produced by a group operating under the
+ <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/" rel="w3p:patentRules" about="" id="sotd_patent">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent
+ Policy</a>.
+
+
+
+
+ <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/46168/status">public list of any patent
+ disclosures</a>
+
+ made in connection with the deliverables of the group; that page also includes
+ instructions for disclosing a patent. An individual who has actual knowledge of a patent
+ which the individual believes contains
+ <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
+ Claim(s)</a> must disclose the information in accordance with
+ <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
+ 6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
+
+ </p>
+
+
+
+
+</section><section id="toc"><h2 class="introductory" aria-level="1" role="heading" id="h2_toc">Table of Contents</h2><ul class="toc" role="directory" id="respecContents"><li class="tocline"><a href="#sec-intro" class="tocxref"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a href="#n-quads-language" class="tocxref"><span class="secno">2. </span>N-Quads Language</a><ul class="toc"><li class="tocline"><a href="#simple-triples" class="tocxref"><span class="secno">2.1 </span>Simple Statements</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="#conformance" class="tocxref"><span class="secno">3. </span>Conformance</a><ul class="toc"><li class="tocline"><a href="#sec-mediatype" class="tocxref"><span class="secno">3.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">3.1.1 </span>Other Media Types</a></li></ul></li></ul></li><li class="tocline"><a href="#sec-grammar" class="tocxref"><span class="secno">4. </span>Grammar</a></li><li class="tocline"><a href="#sec-parsing" class="tocxref"><span class="secno">5. </span>Parsing</a><ul class="toc"><li class="tocline"><a href="#sec-parsing-terms" class="tocxref"><span class="secno">5.1 </span>RDF Term Constructors</a></li><li class="tocline"><a href="#rdf-dataset-construction" class="tocxref"><span class="secno">5.2 </span>RDF Dataset Construction</a></li></ul></li><li class="tocline"><a href="#section-ack" class="tocxref"><span class="secno">6. </span>Acknowledgements</a></li><li class="tocline"><a href="#sec-changes" class="tocxref"><span class="secno">A. </span>Change Log</a><ul class="toc"><li class="tocline"><a href="#changes-between-proposed-recommendation-and-recommendation" class="tocxref"><span class="secno">A.1 </span>Changes between Proposed Recommendation and Recommendation</a></li><li class="tocline"><a href="#changes-between-candidate-recommendation-and-proposed-recommendation" class="tocxref"><span class="secno">A.2 </span>Changes between Candidate Recommendation and Proposed Recommendation</a></li><li class="tocline"><a href="#changes-between-last-call-working-draft-and-candidate-recommendation" class="tocxref"><span class="secno">A.3 </span>Changes between Last Call Working Draft and Candidate Recommendation</a></li><li class="tocline"><a href="#changes-between-publication-as-note-and-last-call-working-draft" class="tocxref"><span class="secno">A.4 </span>Changes between publication as Note and Last Call Working Draft</a></li></ul></li><li class="tocline"><a href="#sec-mediaReg" class="tocxref"><span class="secno">B. </span>N-Quads Internet Media Type, File Extension and Macintosh File Type </a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">C.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">C.2 </span>Informative references</a></li></ul></li></ul></section>
+
+
+
+ <section id="sec-intro" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+
+<!--OddPage-->
+<h2 aria-level="1" role="heading" id="h2_sec-intro"><span class="secno">1. </span>Introduction</h2>
+
+ <p>
+ This document defines N-Quads, an easy to parse, line-based,
+ concrete syntax for
+ <a href="http://www.w3.org/TR/rdf11-concepts/#section-dataset">RDF Datasets</a>
+ [<cite><a class="bibref" href="#bib-RDF11-CONCEPTS">RDF11-CONCEPTS</a></cite>].
+ </p>
+
+ <p>N-quads statements are a sequence of RDF terms representing the subject, predicate, object and graph label of an RDF Triple and the graph it is part of in a dataset. These may be separated 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>
+
+ <div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example"><script type="application/n-quads"><http://one.example/subject1> <http://one.example/predicate1> <http://one.example/object1> <http://example.org/graph3> . # comments here
+# or on a line by themselves
+_:subject1 <http://an.example/predicate1> "object1" <http://example.org/graph1> .
+_:subject2 <http://an.example/predicate2> "object2" <http://example.org/graph5> .
+</script></pre></div>
+
+ </section>
+
+ <section id="n-quads-language">
+
+<!--OddPage-->
+<h2 aria-level="1" role="heading" id="h2_n-quads-language"><span class="secno">2. </span>N-Quads Language</h2>
+ <section id="simple-triples" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+ <h3 aria-level="2" role="heading" id="h3_simple-triples"><span class="secno">2.1 </span>Simple Statements</h3>
+ <p>The simplest statement is a sequence of (subject, predicate, object) terms forming an RDF triple and an optional blank node label or IRI labeling what graph in a dataset the triple belongs to, all are separated by whitespace and terminated by '<code>.</code>' after each statement.</p>
+ <div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example"><script type="application/n-quads"><http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> <http://example.org/graphs/spiderman> .</script></pre></div>
+ <p>The graph label IRI can be omitted, in which case the triples are considered part of the default graph of the RDF dataset.</p><p>
+ </p></section>
+ <section id="sec-iri" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+ <h3 aria-level="2" role="heading" id="h3_sec-iri"><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>.
+ </p>
+ </section>
+ <section id="sec-literals" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+ <h3 aria-level="2" role="heading" id="h3_sec-literals"><span class="secno">2.3 </span>RDF Literals</h3>
+
+ <p><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-literal">Literals</a> are used to identify values such as strings, numbers, dates.</p>
+
+
+ <p>
+ 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.
+ 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>, preceded 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>.
+ </p>
+ </section>
+ <section id="BNodes" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+ <h3 aria-level="2" role="heading" id="h3_BNodes"><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-Quads 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 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>
+ <p>
+ 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-quads">_:alice <http://xmlns.com/foaf/0.1/knows> _:bob <http://example.org/graphs/john> .
+_:bob <http://xmlns.com/foaf/0.1/knows> _:alice <http://example.org/graphs/james> .</script></pre></div>
+ </section>
+
+ </section>
+
+ <section id="conformance" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+<!--OddPage-->
+<h2 aria-level="1" role="heading" id="h2_conformance"><span class="secno">3. </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 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-Quads documents
+ </li><li>N-Quads parsers
+ </li></ul>
+ <p>A conforming <strong>N-Quads document</strong> is a Unicode string that conforms to the grammar and additional constraints defined in <a class="sectionRef sec-ref" href="#sec-grammar">section <span class="secno">4.</span> <span class="sec-title">Grammar</span></a>, starting with the <a href="#grammar-production-nquadsDoc"><code>nquadsDoc</code> production</a>. An N-Quad document serializes an RDF dataset.</p>
+
+ <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_1"><span>Note</span></div><p class="">N-Quads documents do not provide a way of serializing empty graphs that may be part of an RDF dataset.</p></div>
+
+ <p>A conforming <strong>N-Quads parser</strong> is a system capable of reading N-Quads documents on behalf of an application. It makes the serialized RDF graph, as defined in <a class="sectionRef sec-ref" href="#sec-parsing">section <span class="secno">5.</span> <span class="sec-title">Parsing</span></a>, available to the application, usually through some form of API.</p>
+
+ <p>The IRI that identifies the N-Quads language is: <code>http://www.w3.org/ns/formats/N-Quads</code></p>
+
+ <section id="sec-mediatype" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+ <h3 aria-level="2" role="heading" id="h3_sec-mediatype"><span class="secno">3.1 </span>Media Type and Content Encoding</h3>
+
+ <p>The media type of N-Quads is <code>application/n-quads</code>.
+ The content encoding of N-Quads is always UTF-8.
+ See <a href="#sec-mediaReg">N-Quads Media Type</a> for the media type
+ registration form.
+ </p>
+
+ <section id="sec-other-media-types" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+ <h4 aria-level="3" role="heading" id="h4_sec-other-media-types"><span class="secno">3.1.1 </span>Other Media Types</h4>
+ <p>The original specification,
+ <a href="http://sw.deri.org/2008/07/n-quads/">N-Quads: Extending N-Triples with Context</a>,
+ proposed the use of media type <code>text/x-nquads</code> with an encoding
+ using 7-bit US-ASCII.</p>
+ </section>
+
+
+ </section>
+ </section>
+
+ <section id="sec-grammar" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+
+<!--OddPage-->
+<h2 aria-level="1" role="heading" id="h2_sec-grammar"><span class="secno">4. </span>Grammar</h2>
+ <p>An N-Quads document is a Unicode[<cite><a class="bibref" href="#bib-UNICODE">UNICODE</a></cite>] character string encoded in UTF-8.
+ Unicode code points only in the range U+0 to U+10FFFF inclusive are allowed.</p>
+ <p>White space (tab <code>U+0009</code> or space <code>U+0020</code>) is used to separate two terminals which would otherwise be (mis-)recognized as one terminal. White space is significant in the production <a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a>.</p>
+ <p>Comments in N-Quads 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 class="bibref" href="#bib-EBNF-NOTATION">EBNF-NOTATION</a></cite>].</p>
+ <p>Escape sequence rules are the same as Turtle
+ [<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 data-grammar-expression="(',', [('?', ('id', 'statement')), ('*', (',', [('id', 'EOL'), ('id', 'statement')])), ('?', ('id', 'EOL'))])" data-grammar-original="[1] nquadsDoc ::= statement? (EOL statement)* EOL?" id="grammar-production-nquadsDoc">
+ <td>[1]</td>
+ <td><code>nquadsDoc</code></td>
+ <td>::=</td>
+ <td><a href="#grammar-production-statement">statement</a>? (<a href="#grammar-production-EOL">EOL</a> <a href="#grammar-production-statement">statement</a>)<code class="grammar-star">*</code> <a href="#grammar-production-EOL">EOL</a>?</td>
+</tr>
+ <tr data-grammar-expression="(',', [('id', 'subject'), ('id', 'predicate'), ('id', 'object'), ('?', ('id', 'graphLabel')), ("'", '.')])" data-grammar-original="[2] statement ::= subject predicate object graphLabel? '.'" id="grammar-production-statement">
+ <td>[2]</td>
+ <td><code>statement</code></td>
+ <td>::=</td>
+ <td><a href="#grammar-production-subject">subject</a> <a href="#grammar-production-predicate">predicate</a> <a href="#grammar-production-object">object</a> <a href="#grammar-production-graphLabel">graphLabel</a>? '<code class="grammar-literal">.</code>'</td>
+</tr>
+ <tr data-grammar-expression="('|', [('id', 'IRIREF'), ('id', 'BLANK_NODE_LABEL')])" data-grammar-original="[3] subject ::= IRIREF | BLANK_NODE_LABEL" id="grammar-production-subject">
+ <td>[3]</td>
+ <td><code>subject</code></td>
+ <td>::=</td>
+ <td><a href="#grammar-production-IRIREF">IRIREF</a> <code>| </code> <a href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a></td>
+</tr>
+ <tr data-grammar-expression="('id', 'IRIREF')" data-grammar-original="[4] predicate ::= IRIREF" id="grammar-production-predicate">
+ <td>[4]</td>
+ <td><code>predicate</code></td>
+ <td>::=</td>
+ <td><a href="#grammar-production-IRIREF">IRIREF</a></td>
+</tr>
+ <tr data-grammar-expression="('|', [('id', 'IRIREF'), ('id', 'BLANK_NODE_LABEL'), ('id', 'literal')])" data-grammar-original="[5] object ::= IRIREF | BLANK_NODE_LABEL | literal" id="grammar-production-object">
+ <td>[5]</td>
+ <td><code>object</code></td>
+ <td>::=</td>
+ <td><a href="#grammar-production-IRIREF">IRIREF</a> <code>| </code> <a href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a> <code>| </code> <a href="#grammar-production-literal">literal</a></td>
+</tr>
+ <tr data-grammar-expression="('|', [('id', 'IRIREF'), ('id', 'BLANK_NODE_LABEL')])" data-grammar-original="[6] graphLabel ::= IRIREF | BLANK_NODE_LABEL" id="grammar-production-graphLabel">
+ <td>[6]</td>
+ <td><code>graphLabel</code></td>
+ <td>::=</td>
+ <td><a href="#grammar-production-IRIREF">IRIREF</a> <code>| </code> <a href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a></td>
+</tr>
+ <tr data-grammar-expression="(',', [('id', 'STRING_LITERAL_QUOTE'), ('?', ('|', [(',', [("'", '^^'), ('id', 'IRIREF')]), (',', [('id', 'LANGTAG')])]))])" data-grammar-original="[7] literal ::= STRING_LITERAL_QUOTE ('^^' IRIREF | LANGTAG )?" id="grammar-production-literal">
+ <td>[7]</td>
+ <td><code>literal</code></td>
+ <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> <a href="#grammar-production-LANGTAG">LANGTAG</a>)?</td>
+</tr>
+<tr><td colspan="4"><h2 id="terminals">Productions for terminals</h2></td></tr>
+ <tr class="grammar-token" data-grammar-expression="(',', [("'", '@'), ('+', ('[', 'a-zA-Z')), ('*', (',', [("'", '-'), ('+', ('[', 'a-zA-Z0-9'))]))])" data-grammar-original="[144s] LANGTAG ::= "@" [a-zA-Z]+ ( "-" [a-zA-Z0-9]+ )*" id="grammar-production-LANGTAG">
+ <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 class="grammar-token" data-grammar-expression="('+', ('[', '#xD#xA'))" data-grammar-original="[8] EOL ::= [#xD#xA]+" id="grammar-production-EOL">
+ <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 class="grammar-token" data-grammar-expression="(',', [("'", '<'), ('*', ('|', [('[', '^#x00-#x20<>"{}|^`\\'), ('id', 'UCHAR')])), ("'", '>')])" data-grammar-original="[10] IRIREF ::= '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'" id="grammar-production-IRIREF">
+ <td>[10]</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 class="grammar-token" data-grammar-expression="(',', [("'", '"'), ('*', ('|', [('[', '^#x22#x5C#xA#xD'), ('id', 'ECHAR'), ('id', 'UCHAR')])), ("'", '"')])" data-grammar-original="[11] STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"'" id="grammar-production-STRING_LITERAL_QUOTE">
+ <td>[11]</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>
+</tr>
+ <tr class="grammar-token" data-grammar-expression="(',', [("'", '_:'), ('|', [('id', 'PN_CHARS_U'), ('[', '0-9')]), ('?', (',', [('*', ('|', [('id', 'PN_CHARS'), ("'", '.')])), ('id', 'PN_CHARS')]))])" data-grammar-original="[141s] BLANK_NODE_LABEL ::= '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)?" id="grammar-production-BLANK_NODE_LABEL">
+ <td>[141s]</td>
+ <td><code>BLANK_NODE_LABEL</code></td>
+ <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 class="grammar-token" 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')])])" data-grammar-original="[12] UCHAR ::= ( "\u" HEX HEX HEX HEX )| ( "\U" HEX HEX HEX HEX HEX HEX HEX HEX )" id="grammar-production-UCHAR">
+ <td>[12]</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>
+</tr>
+ <tr class="grammar-token" data-grammar-expression="(',', [("'", '\\'), ('[', 'tbnrf"\'')])" data-grammar-original="[153s] ECHAR ::= "\" [tbnrf"\]" id="grammar-production-ECHAR">
+ <td>[153s]</td>
+ <td><code>ECHAR</code></td>
+ <td>::=</td>
+ <td>'<code class="grammar-literal">\</code>' [<code class="grammar-chars">tbnrf"'\</code>]</td>
+</tr>
+ <tr class="grammar-token" data-grammar-expression="('|', [('[', 'A-Z'), ('[', 'a-z'), ('[', '#x00C0-#x00D6'), ('[', '#x00D8-#x00F6'), ('[', '#x00F8-#x02FF'), ('[', '#x0370-#x037D'), ('[', '#x037F-#x1FFF'), ('[', '#x200C-#x200D'), ('[', '#x2070-#x218F'), ('[', '#x2C00-#x2FEF'), ('[', '#x3001-#xD7FF'), ('[', '#xF900-#xFDCF'), ('[', '#xFDF0-#xFFFD'), ('[', '#x10000-#xEFFFF')])" data-grammar-original="[157s] PN_CHARS_BASE ::= [A-Z]| [a-z]| [#x00C0-#x00D6]| [#x00D8-#x00F6]| [#x00F8-#x02FF]| [#x0370-#x037D]| [#x037F-#x1FFF]| [#x200C-#x200D]| [#x2070-#x218F]| [#x2C00-#x2FEF]| [#x3001-#xD7FF]| [#xF900-#xFDCF]| [#xFDF0-#xFFFD]| [#x10000-#xEFFFF]" id="grammar-production-PN_CHARS_BASE">
+ <td>[157s]</td>
+ <td><code>PN_CHARS_BASE</code></td>
+ <td>::=</td>
+ <td>[<code class="grammar-chars">A-Z</code>] <code>| </code> [<code class="grammar-chars">a-z</code>] <code>| </code> [<code class="grammar-chars">#x00C0-#x00D6</code>] <code>| </code> [<code class="grammar-chars">#x00D8-#x00F6</code>] <code>| </code> [<code class="grammar-chars">#x00F8-#x02FF</code>] <code>| </code> [<code class="grammar-chars">#x0370-#x037D</code>] <code>| </code> [<code class="grammar-chars">#x037F-#x1FFF</code>] <code>| </code> [<code class="grammar-chars">#x200C-#x200D</code>] <code>| </code> [<code class="grammar-chars">#x2070-#x218F</code>] <code>| </code> [<code class="grammar-chars">#x2C00-#x2FEF</code>] <code>| </code> [<code class="grammar-chars">#x3001-#xD7FF</code>] <code>| </code> [<code class="grammar-chars">#xF900-#xFDCF</code>] <code>| </code> [<code class="grammar-chars">#xFDF0-#xFFFD</code>] <code>| </code> [<code class="grammar-chars">#x10000-#xEFFFF</code>]</td>
+</tr>
+ <tr class="grammar-token" data-grammar-expression="('|', [('id', 'PN_CHARS_BASE'), ("'", '_'), ("'", ':')])" data-grammar-original="[158s] PN_CHARS_U ::= PN_CHARS_BASE| '_'| ':'" id="grammar-production-PN_CHARS_U">
+ <td>[158s]</td>
+ <td><code>PN_CHARS_U</code></td>
+ <td>::=</td>
+ <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a> <code>| </code> '<code class="grammar-literal">_</code>' <code>| </code> '<code class="grammar-literal">:</code>'</td>
+</tr>
+ <tr class="grammar-token" data-grammar-expression="('|', [('id', 'PN_CHARS_U'), ("'", '-'), ('[', '0-9'), ('#', '#x00B7'), ('[', '#x0300-#x036F'), ('[', '#x203F-#x2040')])" data-grammar-original="[160s] PN_CHARS ::= PN_CHARS_U| "-"| [0-9]| #x00B7| [#x0300-#x036F]| [#x203F-#x2040]" id="grammar-production-PN_CHARS">
+ <td>[160s]</td>
+ <td><code>PN_CHARS</code></td>
+ <td>::=</td>
+ <td><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code>| </code> '<code class="grammar-literal">-</code>' <code>| </code> [<code class="grammar-chars">0-9</code>] <code>| </code> <code class="grammar-char-escape">#x00B7</code> <code>| </code> [<code class="grammar-chars">#x0300-#x036F</code>] <code>| </code> [<code class="grammar-chars">#x203F-#x2040</code>]</td>
+</tr>
+ <tr class="grammar-token" data-grammar-expression="('|', [('[', '0-9'), ('[', 'A-F'), ('[', 'a-f')])" data-grammar-original="[162s] HEX ::= [0-9] | [A-F] | [a-f]" id="grammar-production-HEX">
+ <td>[162s]</td>
+ <td><code>HEX</code></td>
+ <td>::=</td>
+ <td>[<code class="grammar-chars">0-9</code>] <code>| </code> [<code class="grammar-chars">A-F</code>] <code>| </code> [<code class="grammar-chars">a-f</code>]</td>
+</tr>
+</tbody></table>
+</div>
+ </section>
+ <section id="sec-parsing" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+
+<!--OddPage-->
+<h2 aria-level="1" role="heading" id="h2_sec-parsing"><span class="secno">5. </span>Parsing</h2>
+ <p>Parsing N-Quads requires a state of one item:</p>
+ <ul>
+ <li id="bnodeLabels">Map[string -> <a href="http://www.w3.org/TR/rdf11-concepts/#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="#ref" rel="bibo:Chapter">
+ <h3 aria-level="2" role="heading" id="h3_sec-parsing-terms"><span class="secno">5.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 class="sectionRef sec-ref" href="#sec-parsing">section <span class="secno">5.</span> <span class="sec-title">Parsing</span></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 href="#grammar-production-IRIREF" class="type IRI">IRIREF </a></td><td><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-iri"> IRI </a></td><td>The characters between "<" and ">" are taken, with the escape sequences unescaped, to form the unicode string of the IRI.</td></tr>
+ <tr id="handle-STRING_LITERAL_QUOTE"><td style="text-align:left;"><a href="#grammar-production-STRING_LITERAL_QUOTE" class="type lexicalForm">STRING_LITERAL_QUOTE </a></td><td><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form"> lexical form</a></td><td>The characters between the outermost '"'s are taken, with escape sequences unescaped, to form the unicode string of a lexical form.</td></tr>
+ <tr id="handle-LANGTAG"><td style="text-align:left;"><a href="#grammar-production-LANGTAG" class="type langTag">LANGTAG </a></td><td><a href="http://www.w3.org/TR/rdf11-concepts/#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 href="#grammar-production-literal" class="type literal">literal </a></td><td><a href="http://www.w3.org/TR/rdf11-concepts/#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 the <code>LANGTAG</code> rule matched, the datatype is <code>rdf:langString</code> and the language tag is <code>LANGTAG</code>. 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 href="#grammar-production-BLANK_NODE_LABEL" class="type bNode">BLANK_NODE_LABEL </a></td><td><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node"> blank node </a></td><td>The string matching the second argument, <code>PN_LOCAL</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-dataset-construction">
+ <h3 aria-level="2" role="heading" id="h3_rdf-dataset-construction"><span class="secno">5.2 </span>RDF Dataset Construction</h3>
+ <p>An N-Quads document defines an RDF dataset composed of RDF graphs composed of a set of RDF triples. The <code><a href="#grammar-production-statement">statement</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>. This RDF triple is added to the graph labeled by the production <code><a href="#grammar-production-graphLabel">graphLabel</a></code>, if no <code>graphLabel</code> is present the triple is added to the RDF datasets default graph.</p>
+ </section>
+
+
+ </section>
+ <section class="informative" id="section-ack" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+
+<!--OddPage-->
+<h2 aria-level="1" role="heading" id="h2_section-ack"><span class="secno">6. </span>Acknowledgements</h2><p><em>This section is non-normative.</em></p>
+ <p>The editor of the RDF 1.1 edition acknowledges valuable
+ contributions from Gregg Kellogg, Andy Seaborne, Eric
+ Prud'hommeaux, Dave Beckett, David Robillard, Gregory Williams,
+ Antoine Zimmermann, Sandro Hawke, Richard Cyganiak, Pat Hayes,
+ Henry S. Thompson, Bob Ferris, Henry Story, Andreas Harth, Lee
+ Feigenbaum, Peter Ansell, Evan Patton and David Booth.</p>
+ <p>This specification is a product of extensive deliberations by the
+ members of the RDF Working Group chaired by Guus Schreiber and David Wood. It draws upon the eariler specification in <em><a href="http://sw.deri.org/2008/07/n-quads/">N-Quads: Extending N-Triples with Context</a></em>, edited by Richard Cyganiak, Andreas Harth, and Aidan Hogan.</p>
+ </section>
+
+ <section class="appendix" id="sec-changes" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+
+<!--OddPage-->
+<h2 aria-level="1" role="heading" id="h2_sec-changes"><span class="secno">A. </span>Change Log</h2>
+ <section id="changes-between-proposed-recommendation-and-recommendation">
+ <h3 aria-level="2" role="heading" id="h3_changes-between-proposed-recommendation-and-recommendation"><span class="secno">A.1 </span>Changes between Proposed Recommendation and Recommendation</h3>
+ <ul>
+ <li><a href="http://lists.w3.org/Archives/Public/public-rdf-comments/2014Feb/0009.html">Bug in grammar rule [7]</a> concerning language-typed literals fixed.</li>
+ <li>Link to original N-Quads proposal included.</li>
+ </ul>
+ </section>
+ <section id="changes-between-candidate-recommendation-and-proposed-recommendation">
+ <h3 aria-level="2" role="heading" id="h3_changes-between-candidate-recommendation-and-proposed-recommendation"><span class="secno">A.2 </span>Changes between Candidate Recommendation and Proposed Recommendation</h3>
+ <ul>
+ <li>A normative reference to RDF Concepts was added.</li>
+ <li>Informative note about <code>text/x-nquads</code> historical media type added.</li>
+ </ul>
+ </section>
+ <section id="changes-between-last-call-working-draft-and-candidate-recommendation">
+ <h3 aria-level="2" role="heading" id="h3_changes-between-last-call-working-draft-and-candidate-recommendation"><span class="secno">A.3 </span>Changes between Last Call Working Draft and Candidate Recommendation</h3>
+ <p>No substitutive changes.</p>
+ </section>
+ <section id="changes-between-publication-as-note-and-last-call-working-draft">
+ <h3 aria-level="2" role="heading" id="h3_changes-between-publication-as-note-and-last-call-working-draft"><span class="secno">A.4 </span>Changes between publication as Note and Last Call Working Draft</h3>
+ <ul>
+ <li>White space rules defined outside of grammar, as in Turtle.</li>
+ <li>Comment processing defined.</li>
+ <li>Parsing is defined.</li>
+ <li>Recommendation track, not a working group Note.</li>
+ </ul>
+ </section>
+ </section>
+
+ <section class="appendix" id="sec-mediaReg" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+
+<!--OddPage-->
+<h2 aria-level="1" role="heading" id="h2_sec-mediaReg"><span class="secno">B. </span>N-Quads Internet Media Type, File Extension and Macintosh File Type </h2>
+ <dl>
+ <dt>Contact:</dt>
+ <dd>Eric Prud'hommeaux</dd>
+ <dt>See also:</dt>
+
+ <dd><a href="http://www.w3.org/2002/06/registering-mediatype">How to Register a Media Type for a <abbr title="World Wide Web Consortium">W3C</abbr> Specification</a></dd>
+ <dd><a href="http://www.w3.org/2001/tag/2002/0129-mime">Internet Media Type registration, consistency of use</a><br />TAG Finding 3 June 2002 (Revised 4 September 2002)</dd>
+ </dl>
+ <p>The Internet Media Type / MIME Type for N-Quads is "application/n-quads".</p>
+ <p>It is recommended that N-Quads files have the extension ".nq" (all lowercase) on all platforms.</p>
+
+ <p>It is recommended that N-Quads files stored on Macintosh HFS file systems be given a file type of "TEXT".</p>
+ <p>This information that follows will be submitted to the IESG for review, approval, and registration with IANA.</p>
+ <dl>
+ <dt>Type name:</dt>
+ <dd>application</dd>
+
+ <dt>Subtype name:</dt>
+ <dd>n-quads</dd>
+ <dt>Required parameters:</dt>
+ <dd>None</dd>
+ <dt>Optional parameters:</dt>
+ <dd>None</dd>
+
+ <dt>Encoding considerations:</dt>
+ <dd>The syntax of N-Quads 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-Quads 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-Quads 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-Quads documents. Security/privacy protocols must be imposed which reflect the sensitivity of the embedded information.</dd>
+ <dd>N-Quads can express data which is presented to the user, for example, RDF Schema labels. Application rendering strings retrieved from untrusted N-Quads 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-Quads uses IRIs as term identifiers. Applications interpreting data expressed in N-Quads should address the security issues of
+ <a href="http://www.ietf.org/rfc/rfc3987.txt" class="norm">Internationalized Resource Identifiers (IRIs)</a> [<cite><a class="bibref" href="#bib-RFC3987">RFC3987</a></cite>] Section 8, as well as
+ <a href="http://www.ietf.org/rfc/rfc3986.txt" class="norm">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
+ by combining characters may have the same visual representation as another character
+ (LATIN SMALL LETTER E followed by COMBINING ACUTE ACCENT has the same visual representation
+ as LATIN SMALL LETTER E WITH ACUTE).
+
+<!-- (<code>foo:resum鼯code> and <code>fоо:resumé</code>)-->
+
+ 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 href="http://www.unicode.org/reports/tr36/" class="inform">Unicode Security
+ Considerations</a> [<cite><a class="bibref" href="#bib-UNICODE-SECURITY">UNICODE-SECURITY</a></cite>] and
+ <a href="http://www.ietf.org/rfc/rfc3987.txt" class="norm">Internationalized Resource
+ Identifiers (IRIs)</a> [<cite><a class="bibref" href="#bib-RFC3987">RFC3987</a></cite>] Section 8.
+ </dd>
+
+ <dt>Interoperability considerations:</dt>
+ <dd>There are no known interoperability issues.</dd>
+ <dt>Published specification:</dt>
+ <dd>This specification.</dd>
+ <dt>Applications which use this media type:</dt>
+
+ <dd>No widely deployed applications are known to use this media type. It may be used by some web services and clients consuming their data.</dd>
+ <dt>Additional information:</dt>
+ <dt>Magic number(s):</dt>
+ <dd>None.</dd>
+ <dt>File extension(s):</dt>
+ <dd>".nq"</dd>
+
+ <dt>Macintosh file type code(s):</dt>
+ <dd>"TEXT"</dd>
+ <dt>Person & email address to contact for further information:</dt>
+
+ <dd>Eric Prud'hommeaux <eric@w3.org></dd>
+ <dt>Intended usage:</dt>
+ <dd>COMMON</dd>
+ <dt>Restrictions on usage:</dt>
+ <dd>None</dd>
+ <dt>Author/Change controller:</dt>
+
+ <dd>The N-Quads specification is the product of the RDF WG. The <abbr title="World Wide Web Consortium">W3C</abbr> reserves change control over this specifications.</dd>
+ </dl>
+ </section>
+
+
+
+<section class="appendix" id="references" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter">
+<!--OddPage-->
+<h2 aria-level="1" role="heading" id="h2_references"><span class="secno">C. </span>References</h2><section id="normative-references" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter"><h3 aria-level="2" role="heading" id="h3_normative-references"><span class="secno">C.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-RDF11-CONCEPTS">[RDF11-CONCEPTS]</dt><dd rel="dcterms:requires">Richard Cyganiak, David Wood, Markus Lanthaler. <cite><a href="http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/">RDF 1.1 Concepts and Abstract Syntax.</a></cite> W3C Recommendation, 25 February 2014. URL: <a href="http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/">http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/</a>. The latest edition is available at <a href="http://www.w3.org/TR/rdf11-concepts/">http://www.w3.org/TR/rdf11-concepts/</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></dl></section><section id="informative-references" typeof="bibo:Chapter" resource="#ref" rel="bibo:Chapter"><h3 aria-level="2" role="heading" id="h3_informative-references"><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography" about=""><dt id="bib-N-TRIPLES">[N-TRIPLES]</dt><dd rel="dcterms:references">Gavin Carothers, Andy Seabourne. <cite><a href="http://www.w3.org/TR/2014/REC-n-triples-20140225/">RDF 1.1 N-Triples</a></cite>. W3C Recommendation, 25 February 2014. URL: <a href="http://www.w3.org/TR/2014/REC-n-triples-20140225/">http://www.w3.org/TR/2014/REC-n-triples-20140225/</a>. The latest edition is available at <a href="http://www.w3.org/TR/n-triples/">http://www.w3.org/TR/n-triples/</a>
+</dd><dt id="bib-TURTLE">[TURTLE]</dt><dd rel="dcterms:references">Eric Prud'hommeaux, Gavin Carothers. <cite><a href="http://www.w3.org/TR/2014/REC-turtle-20140225/">RDF 1.1 Turtle: Terse RDF Triple Language.</a></cite> W3C Recommendation, 25 February 2014. URL: <a href="http://www.w3.org/TR/2014/REC-turtle-20140225/">http://www.w3.org/TR/2014/REC-turtle-20140225/</a>. The latest edition is available at <a href="http://www.w3.org/TR/turtle/">http://www.w3.org/TR/turtle/</a>
+</dd><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