--- a/drafts/N-Triples.html Mon Apr 01 00:46:06 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1039 +0,0 @@
-<!--?xml version='1.0' encoding='UTF-8'?-->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html dir="ltr" about="" property="dcterms:language" content="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="XHTML+RDFa 1.0" typeof="bibo:Document"><head>
- <title>N-Triples</title>
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-
-
-
- <style type="text/css">
- /* Style Turtle script blocks to be visable */
- pre.example script {
- display:block;
- }
- .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 type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- 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;
-}
-
-code {
- color: #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
- border-top: 1px solid #90b8de;
- border-bottom: 1px solid #90b8de;
- padding: 1em;
- line-height: 120%;
-}
-
-pre.idl::before {
- content: "WebIDL";
- display: block;
- width: 150px;
- background: #90b8de;
- color: #fff;
- font-family: initial;
- padding: 3px;
- font-weight: bold;
- margin: -1em 0 1em -1em;
-}
-
-.idlType {
- color: #ff4500;
- font-weight: bold;
- text-decoration: none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID, .idlDictionaryID {
- font-weight: bold;
- color: #005a9c;
-}
-
-.idlSuperclass {
- font-style: italic;
- color: #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType, .idlMemberType {
- color: #005a9c;
-}
-.idlAttrName, .idlFieldName, .idlMemberName {
- color: #ff4500;
-}
-.idlAttrName a, .idlFieldName a, .idlMemberName a {
- color: #ff4500;
- border-bottom: 1px dotted #ff4500;
- text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
- color: #005a9c;
-}
-.idlMethName {
- color: #ff4500;
-}
-.idlMethName a {
- color: #ff4500;
- border-bottom: 1px dotted #ff4500;
- text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
- color: #005a9c;
-}
-.idlParamName {
- font-style: italic;
-}
-
-.extAttr {
- color: #666;
-}
-
-/*.idlConst*/
-.idlConstType {
- color: #005a9c;
-}
-.idlConstName {
- color: #ff4500;
-}
-.idlConstName a {
- color: #ff4500;
- border-bottom: 1px dotted #ff4500;
- text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
- font-weight: bold;
- color: #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
- color: #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
- color: #c00;
- font-weight: normal;
-}
-
-.excName a {
- font-family: monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
- border-bottom: 1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
- width: 45px;
- text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
-
-.idlImplements a {
- font-weight: bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields, dl.dictionary-members {
- margin-left: 2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt, .dictionary-members dt {
- font-weight: normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code, .dictionary-members dt code {
- font-weight: bold;
- color: #000;
- font-family: monospace;
-}
-
-.attributes dt code, .fields dt code, .dictionary-members dt code {
- background: #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code {
- color: #005a9c;
- background: transparent;
- font-family: inherit;
- font-weight: normal;
- font-style: italic;
-}
-
-.methods dt code {
- background: #d9e6f8;
-}
-
-.constants dt code {
- background: #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd, .dictionary-members dd {
- margin-bottom: 1em;
-}
-
-table.parameters, table.exceptions {
- border-spacing: 0;
- border-collapse: collapse;
- margin: 0.5em 0;
- width: 100%;
-}
-table.parameters { border-bottom: 1px solid #90b8de; }
-table.exceptions { border-bottom: 1px solid #deb890; }
-
-.parameters th, .exceptions th {
- color: #fff;
- padding: 3px 5px;
- text-align: left;
- font-family: initial;
- font-weight: normal;
- text-shadow: #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
- padding: 3px 10px;
- border-top: 1px solid #ddd;
- vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
- border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
- width: 100px;
-}
-
-.parameters td.prmType {
- width: 120px;
-}
-
-table.exceptions table {
- border-spacing: 0;
- border-collapse: collapse;
- width: 100%;
-}
-
-/* --- TOC --- */
-.toc a {
- text-decoration: none;
-}
-
-a .secno {
- color: #000;
-}
-
-/* --- 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;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
- border-top: 1px solid #ff4500;
- border-bottom: 1px solid #ff4500;
- padding: 1em;
- margin-top: 1em;
-}
-
-pre.example::before {
- content: "Example";
- display: block;
- width: 150px;
- background: #ff4500;
- color: #fff;
- font-family: initial;
- padding: 3px;
- font-weight: bold;
- margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
- padding: 1em;
- margin: 1em 0em 0em;
- border: 1px solid #f00;
- background: #ffc;
-}
-
-.issue::before {
- content: "Issue";
- display: block;
- width: 150px;
- margin: -1.5em 0 0.5em 0;
- font-weight: bold;
- border: 1px solid #f00;
- background: #fff;
- padding: 3px 1em;
-}
-
-.note {
- margin: 1em 0em 0em;
- padding: 1em;
- border: 2px solid #cff6d9;
- background: #e2fff0;
-}
-
-.note::before {
- content: "Note";
- display: block;
- width: 150px;
- margin: -1.5em 0 0.5em 0;
- font-weight: bold;
- border: 1px solid #cff6d9;
- background: #fff;
- padding: 3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
- border: solid #bebebe 1px;
- margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
- margin: 1.5em 0.5em 1em 1em;
- font-weight: bold;
- font-style: italic;
-}
-
-span.practicelab { background: #dfffff; }
-
-span.practicelab {
- position: relative;
- padding: 0 0.5em;
- top: -1.5em;
-}
-
-p.practicedesc {
- margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
- p.practicedesc {
- position: relative;
- top: -2em;
- padding: 0;
- margin: 1.5em 0.5em -1em 1em;
- }
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
- background-color: white;
- color: black;
- font-style: normal;
- font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; } /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; } /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: #ffc0cb; font-family: monospace; } /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; } /* comments */
-pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; } /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; } /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; } /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><link href="N-Triples_files/W3C-WD.css" rel="stylesheet" type="text/css" charset="utf-8"><!-- base href="https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/n-triples.html#references" --></head>
- <body style="display: inherit;"><div class="head"><p><a href="http://www.w3.org/"><img alt="W3C" src="N-Triples_files/w3c_home.png" height="48" width="72"></a></p><h1 id="title" class="title" property="dcterms:title">N-Triples</h1><h2 id="subtitle" property="bibo:subtitle">A line-based syntax for an RDF graph</h2><h2 content="2013-04-01T22:00:00+0000" datatype="xsd:dateTime" property="dcterms:issued" id="w3c-working-draft-02-april-2013"><acronym title="World Wide Web Consortium">W3C</acronym> Working Draft 02 April 2013</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2013/WD-n-triples-20130402/">http://www.w3.org/TR/2013/WD-n-triples-20130402/</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><dt>Latest editor's draft:</dt><dd><a href="http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/n-triples.html">http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/n-triples.html</a></dd><dt>Editor:</dt><dd rel="bibo:editor"><span typeof="foaf:Person"><a href="http://gavin.carothers.name/" content="Gavin Carothers" property="foaf:name" rel="foaf:homepage">Gavin Carothers</a>, <a href="https://lexmachina.com/" rel="foaf:workplaceHomepage">Lex Machina, Inc</a></span>
-</dd>
-<dt>Author:</dt><dd rel="dcterms:contributor"><span typeof="foaf:Person"><a href="http://www.dajobe.org/" content="David Beckett" property="foaf:name" rel="foaf:homepage">David Beckett</a></span>
-</dd>
-</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright" rel="license">Copyright</a> © 2001-2013 <span rel="dcterms:publisher"><span typeof="foaf:Organization"><a href="http://www.w3.org/" content="World Wide Web Consortium" property="foaf:name" rel="foaf:homepage"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup></span></span> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. <acronym title="World Wide Web Consortium">W3C</acronym> <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>
- <div id="abstract" class="introductory section" 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></div><div class="introductory section" id="sotd" typeof="bibo:Chapter" resource="#sotd" rel="bibo:chapter"><h2>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 <acronym title="World Wide Web Consortium">W3C</acronym> publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><acronym title="World Wide Web Consortium">W3C</acronym> technical reports index</a> at http://www.w3.org/TR/.</em></p>
-N-Triples was originally defined as a syntax for
-the RDF Test Cases [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-TESTCASES">RDF-TESTCASES</a></cite>] document. Due to its populatity
-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.
- <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 Draft. 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 feedback is welcome.</p><p>Publication as a Working Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">W3C</acronym>
- 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 document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>. The group does not expect this document to become a <acronym title="World Wide Web Consortium">W3C</acronym> Recommendation. <acronym title="World Wide Web Consortium">W3C</acronym> 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 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>.</p></div><div id="toc" typeof="bibo:Chapter" resource="#toc" rel="bibo:chapter" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#sec-triples" class="tocxref"><span class="secno">1 </span>Introduction</a></li><li class="tocline"><a href="#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="#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-triple-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></li><li class="tocline"><a href="#sec-diff-turtle" class="tocxref"><span class="secno">A </span>Summary of diffrences in N-Triples and Turtle</a><ul class="toc"><li class="tocline"><a href="#triples" class="tocxref"><span class="secno">A.1 </span>Triples</a></li><li class="tocline"><a href="#iri-summary" class="tocxref"><span class="secno">A.2 </span>IRI Representations</a></li><li class="tocline"><a href="#literal-summary" class="tocxref"><span class="secno">A.3 </span>Literal Representations</a></li><li class="tocline"><a href="#bnode-summary" class="tocxref"><span class="secno">A.4 </span>Summary of Blank Node Representations in N-Triples and Turtle</a></li></ul></li><li class="tocline"><a href="#sec-mediaReg-n-triples" class="tocxref"><span class="secno">B </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">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></div>
-
-<!-- BEGIN N-TRIPLES SPEC -->
-
-
-
-
- <div id="sec-triples" typeof="bibo:Chapter" resource="#sec-triples" rel="bibo:chapter" class="section">
- <h2><span class="secno">1 </span>Introduction</h2>
- <p>This document defines an easy to parse line-based subset of
- Turtle [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE-TR">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 class="bibref" rel="biblioentry" 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>
-
- <pre class="example"><script type="application/n-triples"><http://one.example/subject1> <http://one.example/predicate1> <http://one.example/object1> . # comments here
-# or on a line by themselves
-_:subject1 <http://an.example/predicate1> "object1" .
-_:subject2 <http://an.example/predicate2> "object2" .
-</script></pre>
-
- <p>
- N-Triples triples are also Turtle <a href="#simple-triples">simple triples</a>, but Turtle includes other <a href="#terms">representations of RDF Terms</a> and <a href="#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.
- </p>
- <p>The RDF graph represented by an N-Triples document contains exactly each triple matching <a href="#prod-ntriples-triple">N-Triples <code>triple</code> production</a>.
- </p></div>
-
- <div id="n-triples-language" typeof="bibo:Chapter" resource="#n-triples-language" rel="bibo:chapter" class="section">
- <h2><span class="secno">2 </span>N-Triples Language</h2>
- <div id="simple-triples" typeof="bibo:Chapter" resource="#simple-triples" rel="bibo:chapter" class="section">
- <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>
- <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>
- <div id="sec-iri" typeof="bibo:Chapter" resource="#sec-iri" rel="bibo:chapter" class="section">
- <h3><span class="secno">2.2 </span>IRIs</h3>
-
- <p>
- <a href="https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html#dfn-iri">IRIs</a> may be written only as absolute IRIs.
- IRIs are enclosed in '<' and '>' and may contain <a href="#numeric">numeric escape sequences</a> (described below). For example <code><http://example.org/#green-goblin></code>.
- </p>
- </div>
- <div id="sec-literals" typeof="bibo:Chapter" resource="#sec-literals" rel="bibo:chapter" class="section">
- <h3><span class="secno">2.3 </span>RDF Literals</h3>
-
- <p><a href="https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html#dfn-literal">Literals</a> are used to identify values such as strings, numbers, dates.</p>
-
-
- <p>
- Literals (Grammar production <a href="#grammar-production-RDFLiteral">RDFLiteral</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 <a href="#numeric">numeric escape sequence</a> or <a href="#string">string escape sequence</a>, 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="https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html#dfn-lexical-form">RDF lexical form</a> is the characters between the delimiters, after processing any escape sequences.
- If present, the <a href="https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html#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="https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html#dfn-datatype-URI">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>.
- </p>
- <p class="issue">
- Include examples with a few escapes for new lines, etc
- </p>
- </div>
- <div id="BNodes" typeof="bibo:Chapter" resource="#BNodes" rel="bibo:chapter" class="section">
- <h3><span class="secno">2.4 </span>RDF Blank Nodes</h3>
- <p>
- <a href="https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html#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 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>
- <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>
-
- </div>
-
-
-
- <div class="informative section" id="n-triple-changes" typeof="bibo:Chapter" resource="#n-triple-changes" rel="bibo:chapter">
- <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
- </li><li>Uses IRIs rather than RDF URI References
- </li><li>Defines a unique media type <code>application/n-triples</code>
- </li><li>Subset of Turtle rather than Notation 3
- </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></ul>
- </div>
-
- <div id="conformance" typeof="bibo:Chapter" resource="#conformance" rel="bibo:chapter" class="section"><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 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" rel="biblioentry" href="#bib-RFC2119">RFC2119</a></cite>].</p>
-
- <p>This specification defines conformance criteria for:</p>
- <ul>
- <li>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 class="sectionRef" href="#sec-grammar">section Not foundsec-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 class="sectionRef" href="#sec-parsing">section 6 Parsing</a>, available to the application, usually through some form of API.</p>
-
- <p class="issue">N-Triple seralizers are not defined here, will likely include optional behavior to conform to RDF Test Cases syntax as well.</p>
-
- <p>The IRI that identifies the N-Triple language is: <code>http://www.w3.org/ns/formats/N-Triple</code></p>
-
- <div id="n-triples-mediatype" typeof="bibo:Chapter" resource="#n-triples-mediatype" rel="bibo:chapter" class="section">
- <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>.
- The content encoding of N-Triples is always UTF-8.
- See <a href="#sec-mediaReg-n-triples">N-Triples Media Type</a> for the media type
- registration form.
- </p>
-
- <div id="other-media-types" typeof="bibo:Chapter" resource="#other-media-types" rel="bibo:chapter" class="section">
- <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 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>
- </div>
-
- </div>
- </div>
-
- <div id="n-triple-grammar" typeof="bibo:Chapter" resource="#n-triple-grammar" rel="bibo:chapter" class="section">
- <h2><span class="secno">5 </span>Grammar</h2>
- <p>A N-Triples document is a Unicode[<cite><a class="bibref" rel="biblioentry" 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>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
- [<cite><a class="bibref" rel="biblioentry" href="#bib-EBNF-NOTATION">EBNF-NOTATION</a></cite>].</p>
- <p><a href="#sec-escapes">Escape sequence rules</a> are the same as Turtle. However, as only the <code>STRING_LITERAL2</code> 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', 'triple')), ('*', (',', [('id', 'EOL'), ('id', 'triple')])), ('?', ('id', 'EOL'))])" data-grammar-original="[1] ntriplesDoc ::= triple? (EOL triple)* EOL?" id="grammar-production-ntriplesDoc">
- <td>[1]</td>
- <td><code>ntriplesDoc</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-triple">triple</a>? (<a href="#grammar-production-EOL">EOL</a> <a href="#grammar-production-triple">triple</a>)<code class="grammar-star">*</code> <a href="#grammar-production-EOL">EOL</a>?</td>
-</tr>
- <tr data-grammar-expression="(',', [('*', ('id', 'WS')), ('id', 'subject'), ('+', ('id', 'WS')), ('id', 'predicate'), ('+', ('id', 'WS')), ('id', 'object'), ('*', ('id', 'WS')), ("'", '.'), ('*', ('id', 'WS'))])" data-grammar-original="[2] triple ::= WS* subject WS+ predicate WS+ object WS* '.' WS*" id="grammar-production-triple">
- <td>[2]</td>
- <td><code>triple</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-WS">WS</a><code class="grammar-star">*</code> <a href="#grammar-production-subject">subject</a> <a href="#grammar-production-WS">WS</a><code class="grammar-plus">+</code> <a href="#grammar-production-predicate">predicate</a> <a href="#grammar-production-WS">WS</a><code class="grammar-plus">+</code> <a href="#grammar-production-object">object</a> <a href="#grammar-production-WS">WS</a><code class="grammar-star">*</code> '<code class="grammar-literal">.</code>' <a href="#grammar-production-WS">WS</a><code class="grammar-star">*</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', 'STRING_LITERAL_QUOTE'), ('?', ('|', [(',', [("'", '^^'), ('id', 'IRIREF')]), (',', [("'", '@'), ('id', 'LANG')])]))])" data-grammar-original="[6] literal ::= STRING_LITERAL_QUOTE ('^^' IRIREF | ('@' LANG) )?" id="grammar-production-literal">
- <td>[6]</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> '<code class="grammar-literal">@</code>' <a href="#grammar-production-LANG">LANG</a>)?</td>
-</tr>
-<tr><td colspan="5"><h4 id="terminals">Productions for terminals</h4></td></tr>
- <tr class="grammar-token" data-grammar-expression="(',', [('+', ('[', 'a-zA-Z')), ('*', (',', [("'", '-'), ('+', ('[', 'a-zA-Z0-9'))]))])" data-grammar-original="[7] LANG ::= [a-zA-Z]+ ( "-" [a-zA-Z0-9]+ )*" id="grammar-production-LANG">
- <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 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="('[', '#x20#x9')" data-grammar-original="[9] WS ::= [#x20#x9]" id="grammar-production-WS">
- <td>[9]</td>
- <td><code>WS</code></td>
- <td>::=</td>
- <td>[<code class="grammar-chars">#x20#x9</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>
- </div>
- <div id="sec-parsing" typeof="bibo:Chapter" resource="#sec-parsing" rel="bibo:chapter" class="section">
- <h2><span class="secno">6 </span>Parsing</h2>
- <p class="issue">It may be simple, but should still be defined.</p>
- </div>
-
- <div class="appendix informative section" id="sec-diff-turtle" typeof="bibo:Chapter" resource="#sec-diff-turtle" rel="bibo:chapter">
- <h2><span class="secno">A </span>Summary of diffrences in N-Triples and Turtle</h2><p><em>This section is non-normative.</em></p>
- <div id="triples" typeof="bibo:Chapter" resource="#triples" rel="bibo:chapter" class="section">
- <h3><span class="secno">A.1 </span>Triples</h3>
- <p>N-Triples only allows for <a href="#simple-triples">simple triple</a> statements which <em class="rfc2119" title="must not">must not</em> contain new lines. A single triple is always a single line of the document.</p>
- </div>
- <div id="iri-summary" typeof="bibo:Chapter" resource="#iri-summary" rel="bibo:chapter" class="section">
- <h3><span class="secno">A.2 </span>IRI Representations</h3>
-
- <table style="border-collapse:collapse;margin: 2em;" class="separated" id="term2escape">
- <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>
- </div>
-
- <div id="literal-summary" typeof="bibo:Chapter" resource="#literal-summary" rel="bibo:chapter" class="section">
- <h3><span class="secno">A.3 </span>Literal Representations</h3>
-
- <table style="border-collapse:collapse;margin: 2em;" class="separated" id="term2escape">
- <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>
- </div>
- <div id="bnode-summary" typeof="bibo:Chapter" resource="#bnode-summary" rel="bibo:chapter" class="section">
- <h3><span class="secno">A.4 </span>Summary of Blank Node Representations in N-Triples and Turtle</h3>
-
- <table style="border-collapse:collapse;margin: 2em;" class="separated" id="term2escape">
- <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>
- </div>
- </div>
-
-
-
-<!-- END N-TRIPLES SPEC -->
-
-
- <div class="appendix section" id="sec-mediaReg-n-triples" typeof="bibo:Chapter" resource="#sec-mediaReg-n-triples" rel="bibo:chapter">
- <h2><span class="secno">B </span>N-Triples 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 <acronym title="World Wide Web Consortium">W3C</acronym> 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-Triples is "application/n-triples".</p>
- <p>It is recommended that N-Triples files have the extension ".nt" (all lowercase) on all platforms.</p>
-
- <p>It is recommended that N-Triples 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-triples</dd>
- <dt>Required parameters:</dt>
- <dd>None</dd>
- <dt>Optional parameters:</dt>
- <dd>None</dd>
-
- <dt>Encoding considerations:</dt>
- <dd>The syntax of N-Triples is expressed over code points in Unicode [<cite><a class="bibref" rel="biblioentry" href="#bib-UNICODE">UNICODE</a></cite>]. The encoding is always UTF-8 [<cite><a class="bibref" rel="biblioentry" 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 class="bibref" rel="biblioentry" 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 class="bibref" rel="biblioentry" 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 href="http://www.ietf.org/rfc/rfc3987.txt" class="norm">Internationalized Resource Identifiers (IRIs)</a> [<cite><a class="bibref" rel="biblioentry" 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" rel="biblioentry" 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" rel="biblioentry" href="#bib-UNISEC">UNISEC</a></cite>] and
- <a href="http://www.ietf.org/rfc/rfc3987.txt" class="norm">Internationalized Resource
- Identifiers (IRIs)</a> [<cite><a class="bibref" rel="biblioentry" 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>".nt"</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-Triples specification is the product of the RDF WG. The <acronym title="World Wide Web Consortium">W3C</acronym> reserves change control over this specifications.</dd>
- </dl>
- </div>
-
-
-
-<div id="references" class="appendix section" typeof="bibo:Chapter" resource="#references" rel="bibo:chapter"><h2><span class="secno">C </span>References</h2><div id="normative-references" typeof="bibo:Chapter" resource="#normative-references" rel="bibo:chapter" class="section"><h3><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-RDF-TESTCASES">[RDF-TESTCASES]</dt><dd rel="dcterms:requires">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 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</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 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.</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 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. 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 rel="dcterms:requires">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 rel="dcterms:requires">The Unicode Consortium. <a href="http://www.unicode.org/unicode/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/unicode/standard/versions/enumeratedversions.html">http://www.unicode.org/unicode/standard/versions/enumeratedversions.html</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></div><div id="informative-references" typeof="bibo:Chapter" resource="#informative-references" rel="bibo:chapter" class="section"><h3><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography" about=""><dt id="bib-UNISEC">[UNISEC]</dt><dd rel="dcterms:references">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>
-</dd></dl></div></div></body></html>
\ No newline at end of file
--- a/drafts/trig.html Mon Apr 01 00:46:06 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1322 +0,0 @@
-<!--?xml version='1.0' encoding='UTF-8'?-->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" about="" property="dcterms:language" content="en" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="XHTML+RDFa 1.0" typeof="bibo:Document"><head>
- <title>TriG</title>
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
-
-
-
- <style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- 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;
-}
-
-code {
- color: #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
- border-top: 1px solid #90b8de;
- border-bottom: 1px solid #90b8de;
- padding: 1em;
- line-height: 120%;
-}
-
-pre.idl::before {
- content: "WebIDL";
- display: block;
- width: 150px;
- background: #90b8de;
- color: #fff;
- font-family: initial;
- padding: 3px;
- font-weight: bold;
- margin: -1em 0 1em -1em;
-}
-
-.idlType {
- color: #ff4500;
- font-weight: bold;
- text-decoration: none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID, .idlDictionaryID {
- font-weight: bold;
- color: #005a9c;
-}
-
-.idlSuperclass {
- font-style: italic;
- color: #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType, .idlMemberType {
- color: #005a9c;
-}
-.idlAttrName, .idlFieldName, .idlMemberName {
- color: #ff4500;
-}
-.idlAttrName a, .idlFieldName a, .idlMemberName a {
- color: #ff4500;
- border-bottom: 1px dotted #ff4500;
- text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
- color: #005a9c;
-}
-.idlMethName {
- color: #ff4500;
-}
-.idlMethName a {
- color: #ff4500;
- border-bottom: 1px dotted #ff4500;
- text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
- color: #005a9c;
-}
-.idlParamName {
- font-style: italic;
-}
-
-.extAttr {
- color: #666;
-}
-
-/*.idlConst*/
-.idlConstType {
- color: #005a9c;
-}
-.idlConstName {
- color: #ff4500;
-}
-.idlConstName a {
- color: #ff4500;
- border-bottom: 1px dotted #ff4500;
- text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
- font-weight: bold;
- color: #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
- color: #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
- color: #c00;
- font-weight: normal;
-}
-
-.excName a {
- font-family: monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
- border-bottom: 1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
- width: 45px;
- text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
-
-.idlImplements a {
- font-weight: bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields, dl.dictionary-members {
- margin-left: 2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt, .dictionary-members dt {
- font-weight: normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code, .dictionary-members dt code {
- font-weight: bold;
- color: #000;
- font-family: monospace;
-}
-
-.attributes dt code, .fields dt code, .dictionary-members dt code {
- background: #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code {
- color: #005a9c;
- background: transparent;
- font-family: inherit;
- font-weight: normal;
- font-style: italic;
-}
-
-.methods dt code {
- background: #d9e6f8;
-}
-
-.constants dt code {
- background: #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd, .dictionary-members dd {
- margin-bottom: 1em;
-}
-
-table.parameters, table.exceptions {
- border-spacing: 0;
- border-collapse: collapse;
- margin: 0.5em 0;
- width: 100%;
-}
-table.parameters { border-bottom: 1px solid #90b8de; }
-table.exceptions { border-bottom: 1px solid #deb890; }
-
-.parameters th, .exceptions th {
- color: #fff;
- padding: 3px 5px;
- text-align: left;
- font-family: initial;
- font-weight: normal;
- text-shadow: #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
- padding: 3px 10px;
- border-top: 1px solid #ddd;
- vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
- border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
- width: 100px;
-}
-
-.parameters td.prmType {
- width: 120px;
-}
-
-table.exceptions table {
- border-spacing: 0;
- border-collapse: collapse;
- width: 100%;
-}
-
-/* --- TOC --- */
-.toc a {
- text-decoration: none;
-}
-
-a .secno {
- color: #000;
-}
-
-/* --- 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;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
- border-top: 1px solid #ff4500;
- border-bottom: 1px solid #ff4500;
- padding: 1em;
- margin-top: 1em;
-}
-
-pre.example::before {
- content: "Example";
- display: block;
- width: 150px;
- background: #ff4500;
- color: #fff;
- font-family: initial;
- padding: 3px;
- font-weight: bold;
- margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
- padding: 1em;
- margin: 1em 0em 0em;
- border: 1px solid #f00;
- background: #ffc;
-}
-
-.issue::before {
- content: "Issue";
- display: block;
- width: 150px;
- margin: -1.5em 0 0.5em 0;
- font-weight: bold;
- border: 1px solid #f00;
- background: #fff;
- padding: 3px 1em;
-}
-
-.note {
- margin: 1em 0em 0em;
- padding: 1em;
- border: 2px solid #cff6d9;
- background: #e2fff0;
-}
-
-.note::before {
- content: "Note";
- display: block;
- width: 150px;
- margin: -1.5em 0 0.5em 0;
- font-weight: bold;
- border: 1px solid #cff6d9;
- background: #fff;
- padding: 3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
- border: solid #bebebe 1px;
- margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
- margin: 1.5em 0.5em 1em 1em;
- font-weight: bold;
- font-style: italic;
-}
-
-span.practicelab { background: #dfffff; }
-
-span.practicelab {
- position: relative;
- padding: 0 0.5em;
- top: -1.5em;
-}
-
-p.practicedesc {
- margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
- p.practicedesc {
- position: relative;
- top: -2em;
- padding: 0;
- margin: 1.5em 0.5em -1em 1em;
- }
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
- background-color: white;
- color: black;
- font-style: normal;
- font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; } /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; } /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: #ffc0cb; font-family: monospace; } /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; } /* comments */
-pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; } /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; } /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; } /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><link href="trig_files/W3C-WD.css" rel="stylesheet" type="text/css" charset="utf-8"></head>
- <body style="display: inherit;"><div class="head"><p><a href="http://www.w3.org/"><img alt="W3C" src="trig_files/w3c_home.png" height="48" width="72"></a></p><h1 id="title" class="title" property="dcterms:title">TriG</h1><h2 id="subtitle" property="bibo:subtitle"><abbr title="Resource Description Framework">RDF</abbr> Dataset Language</h2><h2 content="2013-04-01T22:00:00+0000" datatype="xsd:dateTime" property="dcterms:issued" id="w3c-working-draft-02-april-2013"><acronym title="World Wide Web Consortium">W3C</acronym> Working Draft 02 April 2013</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2013/WD-trig-20130402/">http://www.w3.org/TR/2013/WD-trig-20130402/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/trig/">http://www.w3.org/TR/trig/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html">http://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html</a></dd><dt>Editor:</dt><dd rel="bibo:editor"><span typeof="foaf:Person"><a href="http://gavin.carothers.name/" content="Gavin Carothers" property="foaf:name" rel="foaf:homepage">Gavin Carothers</a>, <a href="https://lexmachina.com/" rel="foaf:workplaceHomepage">Lex Machina</a></span>
-</dd>
-<dt>Authors:</dt><dd rel="dcterms:contributor"><span typeof="foaf:Person"><a href="http://www.bizer.de/" content="Chris Bizer" property="foaf:name" rel="foaf:homepage">Chris Bizer</a>, <a href="http://www.fu-berlin.de/" rel="foaf:workplaceHomepage">Freie Universität Berlin</a></span>
-</dd>
-<dd rel="dcterms:contributor"><span typeof="foaf:Person"><a href="http://richard.cyganiak.de/" content="Richard Cyganiak" property="foaf:name" rel="foaf:homepage">Richard Cyganiak</a>, <a href="http://www.fu-berlin.de/" rel="foaf:workplaceHomepage">Freie Universität Berlin</a></span>
-</dd>
-</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright" rel="license">Copyright</a> © 2010-2013 <span rel="dcterms:publisher"><span typeof="foaf:Organization"><a href="http://www.w3.org/" content="World Wide Web Consortium" property="foaf:name" rel="foaf:homepage"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup></span></span> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. <acronym title="World Wide Web Consortium">W3C</acronym> <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>
- <div id="abstract" class="introductory section" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#abstract" rel="bibo:chapter"><h2>Abstract</h2>
- <p>The Resource Description Framework
- (<abbr title="Resource Description Framework">RDF</abbr>) is a
- general-purpose language for representing information in the Web.</p>
-
- <p>This document defines a textual syntax for <abbr title="Resource Description Framework">RDF</abbr> called TriG
- that allows an <abbr title="Resource Description Framework">RDF</abbr> dataset to be completely written in a compact and
- natural text form, with abbreviations for common usage patterns and
- datatypes. TriG is an extension of the
- <a href="http://www.w3.org/TR/turtle">Turtle</a> format.
- </p>
- </div><div class="introductory section" id="sotd" typeof="bibo:Chapter" resource="#sotd" rel="bibo:chapter"><h2>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 <acronym title="World Wide Web Consortium">W3C</acronym> publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><acronym title="World Wide Web Consortium">W3C</acronym> technical reports index</a> at http://www.w3.org/TR/.</em></p>
-<p>This document is intended the meet the requirement stated in the charter
-<a href="http://www.w3.org/2011/rdf-wg/"><abbr title="Resource Description Framework">RDF</abbr> Working Group</a> to
-define a syntax for multiple graphs. The current document is based on
-the original proposal by Chris Bizer and Richard Cyganiak.</p>
- <p>This document was published by the <a href="http://www.w3.org/2011/rdf-wg/"><abbr title="Resource Description Framework">RDF</abbr> Working Group</a> as a First Public Working Draft. This document is intended to become a <acronym title="World Wide Web Consortium">W3C</acronym> 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 feedback is welcome.</p><p>Publication as a Working Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">W3C</acronym>
- 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 document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>. <acronym title="World Wide Web Consortium">W3C</acronym> 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 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>.</p></div><div id="toc" typeof="bibo:Chapter" resource="#toc" rel="bibo:chapter" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#sec-intro" class="tocxref"><span class="secno">1 </span>Introduction</a></li><li class="tocline"><a href="#sec-trig-intro" class="tocxref"><span class="secno">2 </span>An Introduction to TriG</a><ul class="toc"><li class="tocline"><a href="#sec-graph-statements" class="tocxref"><span class="secno">2.1 </span>Graph Statements</a></li><li class="tocline"><a href="#other-terms" class="tocxref"><span class="secno">2.2 </span>Other Terms</a><ul class="toc"><li class="tocline"><a href="#terms-blanks-nodes" class="tocxref"><span class="secno">2.2.1 </span>Special Considerations for Blank Nodes</a></li></ul></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-mime" class="tocxref"><span class="secno">3.1 </span>Media Type and Content Encoding</a></li></ul></li><li class="tocline"><a href="#sec-grammar" class="tocxref"><span class="secno">4 </span>TriG Grammar</a><ul class="toc"><li class="tocline"><a href="#sec-grammar-ws" class="tocxref"><span class="secno">4.1 </span>White Space</a></li><li class="tocline"><a href="#sec-grammar-comments" class="tocxref"><span class="secno">4.2 </span>Comments</a></li><li class="tocline"><a href="#sec-iri-references" class="tocxref"><span class="secno">4.3 </span>IRI References</a></li><li class="tocline"><a href="#sec-escapes" class="tocxref"><span class="secno">4.4 </span>Escape Sequences</a></li><li class="tocline"><a href="#grammar-ebnf" class="tocxref"><span class="secno">4.5 </span>Grammar</a></li></ul></li><li class="tocline"><a href="#sec-parsing" class="tocxref"><span class="secno">5 </span>Parsing</a></li><li class="tocline"><a href="#sec-differences" class="tocxref"><span class="secno">A </span>Differences from previous TriG</a></li><li class="tocline"><a href="#sec-mediaReg" class="tocxref"><span class="secno">B </span>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></div>
-
-
-
- <div id="sec-intro" typeof="bibo:Chapter" resource="#sec-intro" rel="bibo:chapter" class="section">
- <h2><span class="secno">1 </span>Introduction</h2>
- <p>This document defines TriG a concrete syntax for <abbr title="Resource Description Framework">RDF</abbr> as defined in the
- <a href="https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html"><abbr title="Resource Description Framework">RDF</abbr> Concepts and Abstract Syntax</a>
- ([<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>]) <acronym title="World Wide Web Consortium">W3C</acronym> Recommendation. TriG is an extension of
- <a href="http://www.w3.org/TR/Turtle">Turtle</a> ([<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE-TR">TURTLE-TR</a></cite>]), extended
- to support representing a complete <abbr title="Resource Description Framework">RDF</abbr> Dataset.
- </p></div>
-
- <div class="informative section" id="sec-trig-intro" typeof="bibo:Chapter" resource="#sec-trig-intro" rel="bibo:chapter">
- <h2><span class="secno">2 </span>An Introduction to TriG</h2><p><em>This section is non-normative.</em></p>
-
- <p>A TriG document allows writing down an <abbr title="Resource Description Framework">RDF</abbr> Dataset in a compact
- textual form. It consists of a sequence of directives, graph statements
- which contain triple-generating statements and optional blank lines.
- Comments may be given after a <code>#</code> that is not part of another
- lexical token and continue to the end of the line.</p>
- <p>
-
- </p><p>Graph statements are a pair of an IRI and a group of triple statements
- surrounded by <code>{}</code>. The IRI of the graph statement may be
- used in another graph statement which implies merging the tripes generated
- by each graph statement, and may reoccur as part of any triple statement.
- Optionally one graph statement may not not be labeled with an IRI. Such a
- graph statement corresponds to the Default Graph of an <abbr title="Resource Description Framework">RDF</abbr> Dataset.</p>
- <p>
- The construction of an <abbr title="Resource Description Framework">RDF</abbr> Dataset from a TriG document is defined in <a class="sectionRef" href="#sec-grammar">section 4 TriG Grammar</a> and <a class="sectionRef" href="#sec-parsing">section 5 Parsing</a>.
- </p>
-
- <div id="sec-graph-statements" typeof="bibo:Chapter" resource="#sec-graph-statements" rel="bibo:chapter" class="section">
- <h3><span class="secno">2.1 </span>Graph Statements</h3>
-
- <p>A graph statement pairs an IRI with a <abbr title="Resource Description Framework">RDF</abbr> Graph. The triple statements that make up the graph are enclosed in <code>{}</code>.</p>
-
- <p>In a TriG document a graph IRI <em class="rfc2119" title="may">may</em>
- be used to label more then one graph. The IRI of a graph statement may
-be omitted. In this case the graph is considered the default graph of
-the <abbr title="Resource Description Framework">RDF</abbr> Dataset.</p>
-
- <p>A <abbr title="Resource Description Framework">RDF</abbr> Dataset may contain only a single graph.</p>
- <pre class="example"><span># This document encodes one graph.
-@prefix ex: <http://www.example.org/vocabulary#> .
-@prefix : <http://www.example.org/exampleDocument#> .
-
-:G1 { :Monica a ex:Person ;
- ex:name "Monica Murphy" ;
- ex:homepage <http://www.monicamurphy.org> ;
- ex:email <mailto:monica@monicamurphy.org> ;
- ex:hasSkill ex:Management ,
- ex:Programming . }
-</span></pre>
- <p>A <abbr title="Resource Description Framework">RDF</abbr> Dataset may contain a default graph, and named graphs.</p>
- <pre class="example"><span># This document contains a default graph and two named graphs.
-
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix dc: <http://purl.org/dc/terms/> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-
-# default graph
- {
- <http://example.org/bob> dc:publisher "Bob" .
- <http://example.org/alice> dc:publisher "Alice" .
- }
-
-<http://example.org/bob>
- {
- _:a foaf:name "Bob" .
- _:a foaf:mbox <mailto:bob@oldcorp.example.org> .
- }
-
-<http://example.org/alice>
- {
- _:a foaf:name "Alice" .
- _:a foaf:mbox <mailto:alice@work.example.org> .
- } </span></pre>
- <p class="issue">
- A providence example
- </p>
- <p class="issue">A verisions example</p>
- <p class="issue">A web snapshot example</p>
- </div>
- <div id="other-terms" typeof="bibo:Chapter" resource="#other-terms" rel="bibo:chapter" class="section">
- <h3><span class="secno">2.2 </span>Other Terms</h3>
- <p>All other terms and directives come from Turtle.</p>
- <div id="terms-blanks-nodes" typeof="bibo:Chapter" resource="#terms-blanks-nodes" rel="bibo:chapter" class="section">
- <h4><span class="secno">2.2.1 </span>Special Considerations for Blank Nodes</h4>
- <p>BlankNodes sharing the same label in differently labeled graph statements <em class="rfc2119" title="must">must</em> be considered to be the same BlankNode.</p>
- </div>
- </div>
- </div>
- <div id="conformance" typeof="bibo:Chapter" resource="#conformance" rel="bibo:chapter" class="section"><h2><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" rel="biblioentry" href="#bib-RFC2119">RFC2119</a></cite>].</p>
-
- <p>This specification defines conformance criteria for:</p>
- <ul>
- <li>TriG documents
- </li><li>TriG parsers
- </li></ul>
- <p>A conforming <strong>TriG document</strong> is a Unicode string that conforms to the grammar and additional constraints defined in <a class="sectionRef" href="#sec-grammar">section 4 TriG Grammar</a>, starting with the <a href="#grammar-production-turtleDoc"><code>turtleDoc</code> production</a>. A Turtle document serializes an <abbr title="Resource Description Framework">RDF</abbr> dataset.</p>
-
- <p>A conforming <strong>TriG parser</strong> is a system capable of reading TriG documents on behalf of an application. It makes the serialized <abbr title="Resource Description Framework">RDF</abbr> dataset, as defined in <a class="sectionRef" href="#sec-parsing">section 5 Parsing</a>, available to the application, usually through some form of API.</p>
-
- <p>The IRI that identifies the TriG language is: <code>http://www.w3.org/ns/formats/TriG</code></p>
-
- <p class="note">This specification does not define how TriG parsers handle non-conforming input documents.</p>
- <div id="sec-mime" typeof="bibo:Chapter" resource="#sec-mime" rel="bibo:chapter" class="section">
- <h3><span class="secno">3.1 </span>Media Type and Content Encoding</h3>
-
- <p>The media type of TriG is <code>application/trig</code>.
- The content encoding of TriG content is always UTF-8.
- </p>
- </div>
- </div>
-
- <div id="sec-grammar" typeof="bibo:Chapter" resource="#sec-grammar" rel="bibo:chapter" class="section">
- <h2><span class="secno">4 </span>TriG Grammar</h2>
- <p>A TriG document is a
- Unicode[<cite><a class="bibref" rel="biblioentry" href="#bib-UNICODE">UNICODE</a></cite>]
- character string encoded in UTF-8.
- Unicode characters only in the range U+0000 to U+10FFFF inclusive are
- allowed.
- </p>
- <div id="sec-grammar-ws" typeof="bibo:Chapter" resource="#sec-grammar-ws" rel="bibo:chapter" class="section">
- <h3><span class="secno">4.1 </span>White Space</h3>
- <p>White space (production <a href="#grammar-production-WS">WS</a>)
-is used to separate two terminals which would otherwise be
-(mis-)recognized as one terminal. Rule names below in capitals indicate
-where white space is significant; these form a possible choice of
-terminals for constructing a TriG parser.</p>
-
- <p>White space is significant in the production <a href="#grammar-production-String">String</a>.</p>
- </div>
- <div id="sec-grammar-comments" typeof="bibo:Chapter" resource="#sec-grammar-comments" rel="bibo:chapter" class="section">
- <h3><span class="secno">4.2 </span>Comments</h3>
-
- <p>Comments in TriG take the form of '#', outside an
- <a href="#grammar-production-IRIREF">IRIREF</a> or <a href="#grammar-production-String">String</a>,
- and continue to the end of line (marked by characters U+000D or U+000A)
- or end of file if there is no end of line after the comment
- marker. Comments are treated as white space.
-
- </p>
- </div>
- <div id="sec-iri-references" typeof="bibo:Chapter" resource="#sec-iri-references" rel="bibo:chapter" class="section">
- <h3><span class="secno">4.3 </span>IRI References</h3>
- <p>
- Relative IRIs are resolved with base IRIs as per <a class="norm" href="http://www.ietf.org/rfc/rfc3986.txt">Uniform Resource Identifier (URI): Generic Syntax</a> [<a href="#rfc3986">RFC3986</a>]
- using only the basic algorithm in section 5.2.
- Neither Syntax-Based Normalization nor Scheme-Based Normalization
- (described in sections 6.2.2 and 6.2.3 of RFC3986) are performed.
- Characters additionally allowed in IRI references are treated in
-the same way that unreserved characters are treated in URI references,
-per section 6.5 of <a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource Identifiers (IRIs)</a> [<a href="#rfc3987">RFC3987</a>].
- </p>
- <p>
- The <code>@base</code> directive defines the Base IRI used to
-resolve relative IRIs per RFC3986 section 5.1.1, "Base URI Embedded in
-Content".
- Section 5.1.2, "Base URI from the Encapsulating Entity" defines
-how the In-Scope Base IRI may come from an encapsulating document, such
-as a SOAP envelope with an xml:base directive or a mime multipart
-document with a Content-Location header.
- The "Retrieval URI" identified in 5.1.3, Base "URI from the
-Retrieval URI", is the URL from which a particular Turtle document was
-retrieved.
- If none of the above specifies the Base URI, the default Base URI
- (section 5.1.4, "Default Base URI") is used.
- Each <code>@base</code> directive sets a new In-Scope Base URI, relative to the previous one.
- </p>
- </div>
-
- <div id="sec-escapes" typeof="bibo:Chapter" resource="#sec-escapes" rel="bibo:chapter" class="section">
- <h3><span class="secno">4.4 </span>Escape Sequences</h3>
-
- <p>
- There are three forms of escapes used in TriG documents:
- </p>
-
- <ul>
- <li>
- <p>
- <em id="numeric">numeric escape sequences</em> represent Unicode code points:
- </p>
-
- <table>
- <thead>
- <tr>
- <th>Escape sequence</th>
-
- <th>Unicode code point</th>
-
- </tr>
- </thead>
- <tbody>
-
- <tr>
- <td>'\u' <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a></td>
- <td>A Unicode character in the range U+0000 to U+FFFF inclusive
- corresponding to the value encoded by the four hexadecimal
-digits interpreted from most significant to least significant digit.</td>
- </tr>
-
-
- <tr>
- <td>'\U' <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a></td>
-
- <td>A Unicode character in the range U+0000 to U+10FFFF
-inclusive
- corresponding to the value encoded by the eight hexadecimal
-digits interpreted from most significant to least significant digit.</td>
- </tr>
-
- </tbody>
- </table>
-
- <p>where <a href="#rHEX">HEX</a> is a hexadecimal character</p>
- <blockquote>
- <p><span style="font-family: monospace; font-size: 85%;"><a id="rHEX">HEX</a>
- ::= [0-9] | [A-F] | [a-f]</span></p>
-
- </blockquote>
- </li>
-
- <li>
- <p>
- <em id="string">string escape sequences</em> represent the characters traditionally escaped in string literals:
- </p>
-
- <table>
- <thead>
- <tr>
- <th>Escape sequence</th>
-
- <th>Unicode code point</th>
-
- </tr>
- </thead>
- <tbody>
-
- <tr>
- <td>'\t'</td>
- <td>U+0009</td>
- </tr>
-
- <tr>
- <td>'\b'</td>
- <td>U+0008</td>
- </tr>
-
- <tr>
-
- <td>'\n'</td>
- <td>U+000A</td>
- </tr>
-
- <tr>
- <td>'\r'</td>
- <td>U+000D</td>
- </tr>
-
- <tr>
- <td>'\f'</td>
- <td>U+000C</td>
- </tr>
-
- <tr>
- <td>'\"'</td>
- <td>U+0022</td>
- </tr>
-
- <tr>
- <td>'\''</td>
- <td>U+0027</td>
- </tr>
-
- <tr>
- <td>'\\'</td>
-
- <td>U+005C</td>
- </tr>
-
- </tbody>
- </table>
- </li>
-
- <li>
- <p>
- <em id="reserved">reserved character escape sequences</em> consist of a '\' followed by one of <code>~.-!$&'()*+,;=/?#@%_</code> and represent the character to the right of the '\'.
- </p>
- </li>
-
- </ul>
-
- <table class="separated" id="term2escape">
- <caption>Context where each kind of escape sequence can be used</caption>
- <thead>
- <tr>
- <th></th>
- <th><a href="#numeric">numeric<br>escapes</a></th>
- <th><a href="#string">string<br>escapes</a></th>
- <th><a href="#reserved">reserved character<br>escapes</a></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="r"><span style="font-weight:bold;">IRI</span>s, used as <a href="#grammar-production-IRIref"><abbr title="Resource Description Framework">RDF</abbr> terms</a> or as in <a href="#grammar-production-prefixID">@prefix</a> or <a href="#grammar-production-base">@base</a> declarations</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- <td>no</td>
- </tr>
- <tr>
- <td class="r"><a href="#grammar-production-PN_LOCAL"><span style="font-weight:bold;">local name</span>s</a></td>
- <td>no</td>
- <td>no</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- </tr>
- <tr>
- <td class="r"><span style="font-weight:bold;">String</span>s</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td style="background-color: green; border:1px solid black;">yes</td>
- <td>no</td>
- </tr>
- </tbody>
- </table>
- <p class="note">%-encoded sequences are in the <a href="#grammar-production-IRIREF">character range for IRIs</a> and are <a href="#grammar-production-PERCENT">explicitly allowed</a>
- in local names. These appear as a '%' followed by two hex characters
-and represent that same sequence of three characters. These sequences
-are <em>not</em> decoded during processing. A term written as <code><http://a.example/%66oo-bar></code> in TriG designates the IRI <code>http://a.example/%66oo-bar</code> and not IRI <code>http://a.example/foo-bar</code>. A term written as <code>ex:%66oo-bar</code> with a prefix <code>@prefix ex: <http://a.example/></code> also designates the IRI <code>http://a.example/%66oo-bar</code>.</p>
-
- </div>
- <div id="grammar-ebnf" typeof="bibo:Chapter" resource="#grammar-ebnf" rel="bibo:chapter" class="section">
- <h3><span class="secno">4.5 </span>Grammar</h3>
- <p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
- [<cite><a class="bibref" rel="biblioentry" href="#bib-EBNF-NOTATION">EBNF-NOTATION</a></cite>].
- Production labels consisting of a number and a final 'g' are unique to
-TriG. All Production labels consisting of only a number reference the
-production with that number in the Turtle grammar [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE-TR">TURTLE-TR</a></cite>]. Production labels consisting of a number and a final 's', e.g. [<a href="http://www.w3.org/TR/sparql11-query/#rRDFLiteral"><span class="prodNo">60s</span></a>], reference the production with that number in the <a href="http://www.w3.org/TR/sparql11-query/#sparqlGrammar">SPARQL Query Language for <abbr title="Resource Description Framework">RDF</abbr> grammar</a> [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SPARQL-QUERY">RDF-SPARQL-QUERY</a></cite>].
- </p>
- <div><table class="grammar">
- <tbody class="grammar-productions">
- <tr data-grammar-expression="('*', ('id', 'graph_statement'))" data-grammar-original="[1g] trigDoc ::= (graph_statement)*" id="grammar-production-trigDoc">
- <td>[1g]</td>
- <td><code>trigDoc</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-graph_statement">graph_statement</a><code class="grammar-star">*</code></td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'directive'), ('id', 'graph')])" data-grammar-original="[2g] graph_statement ::= directive| graph" id="grammar-production-graph_statement">
- <td>[2g]</td>
- <td><code>graph_statement</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-directive">directive</a> <code>| </code> <a href="#grammar-production-graph">graph</a></td>
-</tr>
- <tr data-grammar-expression="(',', [('?', ('id', 'graphIri')), ("'", '{'), ('*', (',', [('id', 'triples'), ("'", '.')])), ("'", '}')])" data-grammar-original="[3g] graph ::= graphIri? "{" (triples ".")* "}"" id="grammar-production-graph">
- <td>[3g]</td>
- <td><code>graph</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-graphIri">graphIri</a>? '<code class="grammar-literal">{</code>' (<a href="#grammar-production-triples">triples</a> '<code class="grammar-literal">.</code>')<code class="grammar-star">*</code> '<code class="grammar-literal">}</code>'</td>
-</tr>
- <tr data-grammar-expression="('id', 'iri')" data-grammar-original="[4g] graphIri ::= iri" id="grammar-production-graphIri">
- <td>[4g]</td>
- <td><code>graphIri</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-iri">iri</a></td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'prefixID'), ('id', 'base'), ('id', 'sparqlPrefix'), ('id', 'sparqlBase')])" data-grammar-original="[3] directive ::= prefixID| base | sparqlPrefix | sparqlBase" id="grammar-production-directive">
- <td>[3]</td>
- <td><code>directive</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-prefixID">prefixID</a> <code>| </code> <a href="#grammar-production-base">base</a> <code>| </code> <a href="#grammar-production-sparqlPrefix">sparqlPrefix</a> <code>| </code> <a href="#grammar-production-sparqlBase">sparqlBase</a></td>
-</tr>
- <tr data-grammar-expression="(',', [("'", '@prefix'), ('id', 'PNAME_NS'), ('id', 'IRIREF'), ("'", '.')])" data-grammar-original="[4] prefixID ::= '@prefix' PNAME_NS IRIREF "."" id="grammar-production-prefixID">
- <td>[4]</td>
- <td><code>prefixID</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">@prefix</code>' <a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-IRIREF">IRIREF</a> '<code class="grammar-literal">.</code>'</td>
-</tr>
- <tr data-grammar-expression="(',', [("'", '@base'), ('id', 'IRIREF'), ("'", '.')])" data-grammar-original="[5] base ::= '@base' IRIREF "."" id="grammar-production-base">
- <td>[5]</td>
- <td><code>base</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">@base</code>' <a href="#grammar-production-IRIREF">IRIREF</a> '<code class="grammar-literal">.</code>'</td>
-</tr>
- <tr data-grammar-expression="(',', [('[', 'Pp'), ('[', 'Rr'), ('[', 'Ee'), ('[', 'Ff'), ('[', 'Ii'), ('[', 'Xx'), ('id', 'PNAME_NS'), ('id', 'IRIREF')])" data-grammar-original="[28*] sparqlPrefix ::= [Pp][Rr][Ee][Ff][Ii][Xx] PNAME_NS IRIREF" id="grammar-production-sparqlPrefix">
- <td>[28*]</td>
- <td><code>sparqlPrefix</code></td>
- <td>::=</td>
- <td>[<code class="grammar-chars">Pp</code>] [<code class="grammar-chars">Rr</code>] [<code class="grammar-chars">Ee</code>] [<code class="grammar-chars">Ff</code>] [<code class="grammar-chars">Ii</code>] [<code class="grammar-chars">Xx</code>] <a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-IRIREF">IRIREF</a></td>
-</tr>
- <tr data-grammar-expression="(',', [('[', 'Bb'), ('[', 'Aa'), ('[', 'Ss'), ('[', 'Ee'), ('id', 'IRIREF')])" data-grammar-original="[29*] sparqlBase ::= [Bb][Aa][Ss][Ee] IRIREF" id="grammar-production-sparqlBase">
- <td>[29*]</td>
- <td><code>sparqlBase</code></td>
- <td>::=</td>
- <td>[<code class="grammar-chars">Bb</code>] [<code class="grammar-chars">Aa</code>] [<code class="grammar-chars">Ss</code>] [<code class="grammar-chars">Ee</code>] <a href="#grammar-production-IRIREF">IRIREF</a></td>
-</tr>
- <tr data-grammar-expression="('|', [(',', [('id', 'subject'), ('id', 'predicateObjectList')]), (',', [('id', 'blankNodePropertyList'), ('?', ('id', 'predicateObjectList'))])])" data-grammar-original="[6] triples ::= subject predicateObjectList |blankNodePropertyList predicateObjectList?" id="grammar-production-triples">
- <td>[6]</td>
- <td><code>triples</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-subject">subject</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a> <code>| </code> <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a>?</td>
-</tr>
- <tr data-grammar-expression="(',', [('id', 'verb'), ('id', 'objectList'), ('*', (',', [("'", ';'), ('?', (',', [('id', 'verb'), ('id', 'objectList')]))]))])" data-grammar-original="[7] predicateObjectList ::= verb objectList (';' (verb objectList)? )*" id="grammar-production-predicateObjectList">
- <td>[7]</td>
- <td><code>predicateObjectList</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-verb">verb</a> <a href="#grammar-production-objectList">objectList</a> ('<code class="grammar-literal">;</code>' (<a href="#grammar-production-verb">verb</a> <a href="#grammar-production-objectList">objectList</a>)?)<code class="grammar-star">*</code></td>
-</tr>
- <tr data-grammar-expression="(',', [('id', 'object'), ('*', (',', [("'", ','), ('id', 'object')]))])" data-grammar-original="[8] objectList ::= object ( "," object )*" id="grammar-production-objectList">
- <td>[8]</td>
- <td><code>objectList</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-object">object</a> ('<code class="grammar-literal">,</code>' <a href="#grammar-production-object">object</a>)<code class="grammar-star">*</code></td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'predicate'), ("'", 'a')])" data-grammar-original="[9] verb ::= predicate| "a"" id="grammar-production-verb">
- <td>[9]</td>
- <td><code>verb</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-predicate">predicate</a> <code>| </code> '<code class="grammar-literal">a</code>'</td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'iri'), ('id', 'blank')])" data-grammar-original="[10] subject ::= iri| blank" id="grammar-production-subject">
- <td>[10]</td>
- <td><code>subject</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-iri">iri</a> <code>| </code> <a href="#grammar-production-blank">blank</a></td>
-</tr>
- <tr data-grammar-expression="('id', 'iri')" data-grammar-original="[11] predicate ::= iri" id="grammar-production-predicate">
- <td>[11]</td>
- <td><code>predicate</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-iri">iri</a></td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'iri'), ('id', 'blank'), ('id', 'blankNodePropertyList'), ('id', 'literal')])" data-grammar-original="[12] object ::= iri| blank| blankNodePropertyList| literal" id="grammar-production-object">
- <td>[12]</td>
- <td><code>object</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-iri">iri</a> <code>| </code> <a href="#grammar-production-blank">blank</a> <code>| </code> <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> <code>| </code> <a href="#grammar-production-literal">literal</a></td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'RDFLiteral'), ('id', 'NumericLiteral'), ('id', 'BooleanLiteral')])" data-grammar-original="[13] literal ::= RDFLiteral| NumericLiteral| BooleanLiteral" id="grammar-production-literal">
- <td>[13]</td>
- <td><code>literal</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-RDFLiteral">RDFLiteral</a> <code>| </code> <a href="#grammar-production-NumericLiteral">NumericLiteral</a> <code>| </code> <a href="#grammar-production-BooleanLiteral">BooleanLiteral</a></td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'BlankNode'), ('id', 'collection')])" data-grammar-original="[14] blank ::= BlankNode| collection" id="grammar-production-blank">
- <td>[14]</td>
- <td><code>blank</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-BlankNode">BlankNode</a> <code>| </code> <a href="#grammar-production-collection">collection</a></td>
-</tr>
- <tr data-grammar-expression="(',', [("'", '['), ('id', 'predicateObjectList'), ("'", ']')])" data-grammar-original="[15] blankNodePropertyList ::= "[" predicateObjectList "]"" id="grammar-production-blankNodePropertyList">
- <td>[15]</td>
- <td><code>blankNodePropertyList</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">[</code>' <a href="#grammar-production-predicateObjectList">predicateObjectList</a> '<code class="grammar-literal">]</code>'</td>
-</tr>
- <tr data-grammar-expression="(',', [("'", '('), ('*', ('id', 'object')), ("'", ')')])" data-grammar-original="[16] collection ::= "(" object* ")"" id="grammar-production-collection">
- <td>[16]</td>
- <td><code>collection</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">(</code>' <a href="#grammar-production-object">object</a><code class="grammar-star">*</code> '<code class="grammar-literal">)</code>'</td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'INTEGER'), ('id', 'DECIMAL'), ('id', 'DOUBLE')])" data-grammar-original="[17] NumericLiteral ::= INTEGER | DECIMAL | DOUBLE" id="grammar-production-NumericLiteral">
- <td>[17]</td>
- <td><code>NumericLiteral</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-INTEGER">INTEGER</a> <code>| </code> <a href="#grammar-production-DECIMAL">DECIMAL</a> <code>| </code> <a href="#grammar-production-DOUBLE">DOUBLE</a></td>
-</tr>
- <tr data-grammar-expression="(',', [('id', 'String'), ('?', ('|', [('id', 'LANGTAG'), (',', [("'", '^^'), ('id', 'iri')])]))])" data-grammar-original="[128s] RDFLiteral ::= String ( LANGTAG | ( "^^" iri ) )?" id="grammar-production-RDFLiteral">
- <td>[128s]</td>
- <td><code>RDFLiteral</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-String">String</a> (<a href="#grammar-production-LANGTAG">LANGTAG</a> <code>| </code> '<code class="grammar-literal">^^</code>' <a href="#grammar-production-iri">iri</a>)?</td>
-</tr>
- <tr data-grammar-expression="('|', [("'", 'true'), ("'", 'false')])" data-grammar-original="[133s] BooleanLiteral ::= "true"| "false"" id="grammar-production-BooleanLiteral">
- <td>[133s]</td>
- <td><code>BooleanLiteral</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">true</code>' <code>| </code> '<code class="grammar-literal">false</code>'</td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'STRING_LITERAL_QUOTE'), ('id', 'STRING_LITERAL_SINGLE_QUOTE'), ('id', 'STRING_LITERAL_LONG_SINGLE_QUOTE'), ('id', 'STRING_LITERAL_LONG_QUOTE')])" data-grammar-original="[18] String ::= STRING_LITERAL_QUOTE| STRING_LITERAL_SINGLE_QUOTE| STRING_LITERAL_LONG_SINGLE_QUOTE| STRING_LITERAL_LONG_QUOTE" id="grammar-production-String">
- <td>[18]</td>
- <td><code>String</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a> <code>| </code> <a href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE">STRING_LITERAL_SINGLE_QUOTE</a> <code>| </code> <a href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">STRING_LITERAL_LONG_SINGLE_QUOTE</a> <code>| </code> <a href="#grammar-production-STRING_LITERAL_LONG_QUOTE">STRING_LITERAL_LONG_QUOTE</a></td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'IRIREF'), ('id', 'PrefixedName')])" data-grammar-original="[135s] iri ::= IRIREF| PrefixedName" id="grammar-production-iri">
- <td>[135s]</td>
- <td><code>iri</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-IRIREF">IRIREF</a> <code>| </code> <a href="#grammar-production-PrefixedName">PrefixedName</a></td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'PNAME_LN'), ('id', 'PNAME_NS')])" data-grammar-original="[136s] PrefixedName ::= PNAME_LN| PNAME_NS" id="grammar-production-PrefixedName">
- <td>[136s]</td>
- <td><code>PrefixedName</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-PNAME_LN">PNAME_LN</a> <code>| </code> <a href="#grammar-production-PNAME_NS">PNAME_NS</a></td>
-</tr>
- <tr data-grammar-expression="('|', [('id', 'BLANK_NODE_LABEL'), ('id', 'ANON')])" data-grammar-original="[137s] BlankNode ::= BLANK_NODE_LABEL| ANON" id="grammar-production-BlankNode">
- <td>[137s]</td>
- <td><code>BlankNode</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a> <code>| </code> <a href="#grammar-production-ANON">ANON</a></td>
-</tr>
-<tr><td colspan="5"><h4 id="terminals">Productions for terminals</h4></td></tr>
- <tr class="grammar-token" data-grammar-expression="(',', [("'", '<'), ('*', ('|', [('[', '^#x00-#x20<>"{}|^`\\'), ('id', 'UCHAR')])), ("'", '>')])" data-grammar-original="[19] IRIREF ::= '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'" id="grammar-production-IRIREF">
- <td>[19]</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="(',', [('?', ('id', 'PN_PREFIX')), ("'", ':')])" data-grammar-original="[139s] PNAME_NS ::= PN_PREFIX? ":"" id="grammar-production-PNAME_NS">
- <td>[139s]</td>
- <td><code>PNAME_NS</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-PN_PREFIX">PN_PREFIX</a>? '<code class="grammar-literal">:</code>'</td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="(',', [('id', 'PNAME_NS'), ('id', 'PN_LOCAL')])" data-grammar-original="[140s] PNAME_LN ::= PNAME_NS PN_LOCAL" id="grammar-production-PNAME_LN">
- <td>[140s]</td>
- <td><code>PNAME_LN</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-PN_LOCAL">PN_LOCAL</a></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="(',', [("'", '@'), ('+', ('[', '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="(',', [('?', ('[', '+-')), ('+', ('[', '0-9'))])" data-grammar-original="[20] INTEGER ::= [+-]? [0-9]+" id="grammar-production-INTEGER">
- <td>[20]</td>
- <td><code>INTEGER</code></td>
- <td>::=</td>
- <td>[<code class="grammar-chars">+-</code>]? [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code></td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="(',', [('?', ('[', '+-')), (',', [('*', ('[', '0-9')), ("'", '.'), ('+', ('[', '0-9'))])])" data-grammar-original="[21] DECIMAL ::= [+-]? ( ([0-9])* '.' ([0-9])+ )" id="grammar-production-DECIMAL">
- <td>[21]</td>
- <td><code>DECIMAL</code></td>
- <td>::=</td>
- <td>[<code class="grammar-chars">+-</code>]? ([<code class="grammar-chars">0-9</code>]<code class="grammar-star">*</code> '<code class="grammar-literal">.</code>' [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code>)</td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="(',', [('?', ('[', '+-')), ('|', [(',', [('+', ('[', '0-9')), ("'", '.'), ('*', ('[', '0-9')), ('id', 'EXPONENT')]), (',', [("'", '.'), ('+', ('[', '0-9')), ('id', 'EXPONENT')]), (',', [('+', ('[', '0-9')), ('id', 'EXPONENT')])])])" data-grammar-original="[22] DOUBLE ::= [+-]? ( [0-9]+ '.' [0-9]* EXPONENT | '.' ([0-9])+ EXPONENT | ([0-9])+EXPONENT )" id="grammar-production-DOUBLE">
- <td>[22]</td>
- <td><code>DOUBLE</code></td>
- <td>::=</td>
- <td>[<code class="grammar-chars">+-</code>]? ([<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code> '<code class="grammar-literal">.</code>' [<code class="grammar-chars">0-9</code>]<code class="grammar-star">*</code> <a href="#grammar-production-EXPONENT">EXPONENT</a> <code>| </code> '<code class="grammar-literal">.</code>' [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code> <a href="#grammar-production-EXPONENT">EXPONENT</a> <code>| </code> [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code> <a href="#grammar-production-EXPONENT">EXPONENT</a>)</td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="(',', [('[', 'eE'), ('?', ('[', '+-')), ('+', ('[', '0-9'))])" data-grammar-original="[154s] EXPONENT ::= [eE] [+-]? [0-9]+" id="grammar-production-EXPONENT">
- <td>[154s]</td>
- <td><code>EXPONENT</code></td>
- <td>::=</td>
- <td>[<code class="grammar-chars">eE</code>] [<code class="grammar-chars">+-</code>]? [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code></td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="(',', [("'", '"'), ('*', ('|', [('[', '^#x22#x5C#xA#xD'), ('id', 'ECHAR'), ('id', 'UCHAR')])), ("'", '"')])" data-grammar-original="[23] STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"'" id="grammar-production-STRING_LITERAL_QUOTE">
- <td>[23]</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="(',', [("'", "'"), ('*', ('|', [('[', '^#x27#x5C#xA#xD'), ('id', 'ECHAR'), ('id', 'UCHAR')])), ("'", "'")])" data-grammar-original="[24] STRING_LITERAL_SINGLE_QUOTE ::= "'" ( [^#x27#x5C#xA#xD] | ECHAR | UCHAR )* "'"" id="grammar-production-STRING_LITERAL_SINGLE_QUOTE">
- <td>[24]</td>
- <td><code>STRING_LITERAL_SINGLE_QUOTE</code></td>
- <td>::=</td>
- <td>"<code class="grammar-literal">'</code>" ([<code class="grammar-chars">^#x27#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', 'ECHAR'), ('id', 'UCHAR')])])), ("'", "'''")])" data-grammar-original="[25] STRING_LITERAL_LONG_SINGLE_QUOTE ::= "'''" ( ( "'" | "''" )? ( [^'\] | ECHAR | UCHAR ) )* "'''"" id="grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">
- <td>[25]</td>
- <td><code>STRING_LITERAL_LONG_SINGLE_QUOTE</code></td>
- <td>::=</td>
- <td>"<code class="grammar-literal">'''</code>" (("<code class="grammar-literal">'</code>" <code>| </code> "<code class="grammar-literal">''</code>")? [<code class="grammar-chars">^'\</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', 'ECHAR'), ('id', 'UCHAR')])])), ("'", '"""')])" data-grammar-original="[26] STRING_LITERAL_LONG_QUOTE ::= '"""' ( ( '"' | '""' )? ( [^"\] | ECHAR | UCHAR ) )* '"""'" id="grammar-production-STRING_LITERAL_LONG_QUOTE">
- <td>[26]</td>
- <td><code>STRING_LITERAL_LONG_QUOTE</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">"""</code>' (('<code class="grammar-literal">"</code>' <code>| </code> '<code class="grammar-literal">""</code>')? [<code class="grammar-chars">^"\</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="('|', [(',', [("'", '\\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="[27] UCHAR ::= ( "\u" HEX HEX HEX HEX )| ( "\U" HEX HEX HEX HEX HEX HEX HEX HEX )" id="grammar-production-UCHAR">
- <td>[27]</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="[159s] ECHAR ::= "\" [tbnrf\"']" id="grammar-production-ECHAR">
- <td>[159s]</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="(',', [("'", '('), ('*', ('id', 'WS')), ("'", ')')])" data-grammar-original="[160s] NIL ::= "(" WS* ")"" id="grammar-production-NIL">
- <td>[160s]</td>
- <td><code>NIL</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">(</code>' <a href="#grammar-production-WS">WS</a><code class="grammar-star">*</code> '<code class="grammar-literal">)</code>'</td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="('|', [('#', '#x20'), ('#', '#x9'), ('#', '#xD'), ('#', '#xA')])" data-grammar-original="[161s] WS ::= #x20 | #x9 | #xD | #xA" id="grammar-production-WS">
- <td>[161s]</td>
- <td><code>WS</code></td>
- <td>::=</td>
- <td><code class="grammar-char-escape">#x20</code> <code>| </code> <code class="grammar-char-escape">#x9</code> <code>| </code> <code class="grammar-char-escape">#xD</code> <code>| </code> <code class="grammar-char-escape">#xA</code></td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="(',', [("'", '['), ('*', ('id', 'WS')), ("'", ']')])" data-grammar-original="[162s] ANON ::= "[" WS* "]"" id="grammar-production-ANON">
- <td>[162s]</td>
- <td><code>ANON</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">[</code>' <a href="#grammar-production-WS">WS</a><code class="grammar-star">*</code> '<code class="grammar-literal">]</code>'</td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="('|', [('[', 'A-Z'), ('[', 'a-z'), ('[', '#00C0-#00D6'), ('[', '#00D8-#00F6'), ('[', '#00F8-#02FF'), ('[', '#0370-#037D'), ('[', '#037F-#1FFF'), ('[', '#200C-#200D'), ('[', '#2070-#218F'), ('[', '#2C00-#2FEF'), ('[', '#3001-#D7FF'), ('[', '#F900-#FDCF'), ('[', '#FDF0-#FFFD'), ('[', '#10000-#EFFFF')])" data-grammar-original="[163s] PN_CHARS_BASE ::= [A-Z]| [a-z]| [#00C0-#00D6]| [#00D8-#00F6]| [#00F8-#02FF]| [#0370-#037D]| [#037F-#1FFF]| [#200C-#200D]| [#2070-#218F]| [#2C00-#2FEF]| [#3001-#D7FF]| [#F900-#FDCF]| [#FDF0-#FFFD]| [#10000-#EFFFF]" id="grammar-production-PN_CHARS_BASE">
- <td>[163s]</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">#00C0-#00D6</code>] <code>| </code> [<code class="grammar-chars">#00D8-#00F6</code>] <code>| </code> [<code class="grammar-chars">#00F8-#02FF</code>] <code>| </code> [<code class="grammar-chars">#0370-#037D</code>] <code>| </code> [<code class="grammar-chars">#037F-#1FFF</code>] <code>| </code> [<code class="grammar-chars">#200C-#200D</code>] <code>| </code> [<code class="grammar-chars">#2070-#218F</code>] <code>| </code> [<code class="grammar-chars">#2C00-#2FEF</code>] <code>| </code> [<code class="grammar-chars">#3001-#D7FF</code>] <code>| </code> [<code class="grammar-chars">#F900-#FDCF</code>] <code>| </code> [<code class="grammar-chars">#FDF0-#FFFD</code>] <code>| </code> [<code class="grammar-chars">#10000-#EFFFF</code>]</td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="('|', [('id', 'PN_CHARS_BASE'), ("'", '_')])" data-grammar-original="[164s] PN_CHARS_U ::= PN_CHARS_BASE| '_'" id="grammar-production-PN_CHARS_U">
- <td>[164s]</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>'</td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="('|', [('id', 'PN_CHARS_U'), ("'", '-'), ('[', '0-9'), ('#', '#00B7'), ('[', '#0300-#036F'), ('[', '#203F-#2040')])" data-grammar-original="[166s] PN_CHARS ::= PN_CHARS_U| "-"| [0-9]| #00B7| [#0300-#036F]| [#203F-#2040]" id="grammar-production-PN_CHARS">
- <td>[166s]</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">#00B7</code> <code>| </code> [<code class="grammar-chars">#0300-#036F</code>] <code>| </code> [<code class="grammar-chars">#203F-#2040</code>]</td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="(',', [('id', 'PN_CHARS_BASE'), ('?', (',', [('*', ('|', [('id', 'PN_CHARS'), ("'", '.')])), ('id', 'PN_CHARS')]))])" data-grammar-original="[167s] PN_PREFIX ::= PN_CHARS_BASE ( ( PN_CHARS | "." )* PN_CHARS )?" id="grammar-production-PN_PREFIX">
- <td>[167s]</td>
- <td><code>PN_PREFIX</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a> ((<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="(',', [('|', [('id', 'PN_CHARS_U'), ("'", ':'), ('[', '0-9'), ('id', 'PLX')]), ('?', (',', [('*', ('|', [('id', 'PN_CHARS'), ("'", '.'), ("'", ':'), ('id', 'PLX')])), ('|', [('id', 'PN_CHARS'), ("'", ':'), ('id', 'PLX')])]))])" data-grammar-original="[168s] PN_LOCAL ::= ( PN_CHARS_U | ':' | [0-9] | PLX ) ( ( PN_CHARS | '.' | ':' | PLX )* ( PN_CHARS | ':' | PLX ) ) ?" id="grammar-production-PN_LOCAL">
- <td>[168s]</td>
- <td><code>PN_LOCAL</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> <a href="#grammar-production-PLX">PLX</a>) ((<a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>| </code> '<code class="grammar-literal">.</code>' <code>| </code> '<code class="grammar-literal">:</code>' <code>| </code> <a href="#grammar-production-PLX">PLX</a>)<code class="grammar-star">*</code> <a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>| </code> '<code class="grammar-literal">:</code>' <code>| </code> <a href="#grammar-production-PLX">PLX</a>)?</td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="('|', [('id', 'PERCENT'), ('id', 'PN_LOCAL_ESC')])" data-grammar-original="[169s] PLX ::= PERCENT | PN_LOCAL_ESC" id="grammar-production-PLX">
- <td>[169s]</td>
- <td><code>PLX</code></td>
- <td>::=</td>
- <td><a href="#grammar-production-PERCENT">PERCENT</a> <code>| </code> <a href="#grammar-production-PN_LOCAL_ESC">PN_LOCAL_ESC</a></td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="(',', [("'", '%'), ('id', 'HEX'), ('id', 'HEX')])" data-grammar-original="[170s] PERCENT ::= '%' HEX HEX" id="grammar-production-PERCENT">
- <td>[170s]</td>
- <td><code>PERCENT</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">%</code>' <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a></td>
-</tr>
- <tr class="grammar-token" data-grammar-expression="('|', [('[', '0-9'), ('[', 'A-F'), ('[', 'a-f')])" data-grammar-original="[171s] HEX ::= [0-9] | [A-F] | [a-f]" id="grammar-production-HEX">
- <td>[171s]</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>
- <tr class="grammar-token" data-grammar-expression="(',', [("'", '\\'), ('|', [("'", '_'), ("'", '~'), ("'", '.'), ("'", '-'), ("'", '!'), ("'", '$'), ("'", '&'), ("'", "'"), ("'", '('), ("'", ')'), ("'", '*'), ("'", '+'), ("'", ','), ("'", ';'), ("'", '='), ("'", '/'), ("'", '?'), ("'", '#'), ("'", '@'), ("'", '%')])])" data-grammar-original="[172s] PN_LOCAL_ESC ::= '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%' )" id="grammar-production-PN_LOCAL_ESC">
- <td>[172s]</td>
- <td><code>PN_LOCAL_ESC</code></td>
- <td>::=</td>
- <td>'<code class="grammar-literal">\</code>' ('<code class="grammar-literal">_</code>' <code>| </code> '<code class="grammar-literal">~</code>' <code>| </code> '<code class="grammar-literal">.</code>' <code>| </code> '<code class="grammar-literal">-</code>' <code>| </code> '<code class="grammar-literal">!</code>' <code>| </code> '<code class="grammar-literal">$</code>' <code>| </code> '<code class="grammar-literal">&</code>' <code>| </code> "<code class="grammar-literal">'</code>" <code>| </code> '<code class="grammar-literal">(</code>' <code>| </code> '<code class="grammar-literal">)</code>' <code>| </code> '<code class="grammar-literal">*</code>' <code>| </code> '<code class="grammar-literal">+</code>' <code>| </code> '<code class="grammar-literal">,</code>' <code>| </code> '<code class="grammar-literal">;</code>' <code>| </code> '<code class="grammar-literal">=</code>' <code>| </code> '<code class="grammar-literal">/</code>' <code>| </code> '<code class="grammar-literal">?</code>' <code>| </code> '<code class="grammar-literal">#</code>' <code>| </code> '<code class="grammar-literal">@</code>' <code>| </code> '<code class="grammar-literal">%</code>')</td>
-</tr>
-</tbody></table>
-</div></div>
- </div>
- <div id="sec-parsing" typeof="bibo:Chapter" resource="#sec-parsing" rel="bibo:chapter" class="section">
- <h2><span class="secno">5 </span>Parsing</h2>
- <p class="issue">
- Define a method of parsing that treats each graph statement as a
-Turtle document. Merge any graph statements that have the same label, or
- if they don't have a label merge to form the default graph.
- </p>
- </div>
- <div class="appendix informative section" id="sec-differences" typeof="bibo:Chapter" resource="#sec-differences" rel="bibo:chapter">
- <h2><span class="secno">A </span>Differences from previous TriG</h2><p><em>This section is non-normative.</em></p>
- <ul>
- <li>No support for optional = graph naming operator or optional "." after each graph. N3 compatibility not supported.</li>
- <li>Graph labels do not have to be unique within a TriG document. Reused labels are merged.</li>
- <li>Multiple unnamed graphs in the same TriG document are merged</li>
- </ul>
- </div>
- <div class="appendix section" id="sec-mediaReg" typeof="bibo:Chapter" resource="#sec-mediaReg" rel="bibo:chapter">
- <h2><span class="secno">B </span>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 <acronym title="World Wide Web Consortium">W3C</acronym> 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 TriG is "application/trig".</p>
- <p>It is recommended that TriG files have the extension ".trig" (all lowercase) on all platforms.</p>
-
- <p>It is recommended that TriG files stored on Macintosh HFS file systems be given a file type of "TEXT".</p>
- <p>This information that follows has been <a href="http://www.w3.org/mid/20071218114549.GQ8244@w3.org">submitted to the IESG</a> for review, approval, and registration with IANA.</p>
- <dl>
- <dt>Type name:</dt>
- <dd>application</dd>
-
- <dt>Subtype name:</dt>
- <dd>trig</dd>
- <dt>Required parameters:</dt>
- <dd>None</dd>
- <dt>Optional parameters:</dt>
- <dd>None</dd>
-
- <dt>Encoding considerations:</dt>
- <dd>The syntax of TriG is expressed over code points in Unicode [<cite><a class="bibref" rel="biblioentry" href="#bib-UNICODE">UNICODE</a></cite>]. The encoding is always UTF-8 [<cite><a class="bibref" rel="biblioentry" href="#bib-UTF-8">UTF-8</a></cite>].</dd>
- <dd>Unicode code points may also be expressed using an \uXXXX
-(U+0000 to U+FFFF) or \UXXXXXXXX syntax (for U+10000 onwards) where X is
- a hexadecimal digit [0-9A-Fa-f]</dd>
- <dt>Security considerations:</dt>
- <dd>TriG 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" rel="biblioentry" 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>TriG 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 Turtle documents.
-Security/privacy protocols must be imposed which reflect the sensitivity
- of the embedded information.</dd>
- <dd>TriG can express data which is presented to the user, for example, <abbr title="Resource Description Framework">RDF</abbr>
- Schema labels. Application rendering strings retrieved from untrusted
-Turtle 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" rel="biblioentry" href="#bib-RFC3023">RFC3023</a></cite>] section 10) provide additional guidance around the expression of arbitrary data and markup.</dd>
- <dd>TriG uses IRIs as term identifiers. Applications interpreting data expressed in TriG 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" rel="biblioentry" 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" rel="biblioentry" 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
-TriG 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" rel="biblioentry" href="#bib-UNISEC">UNISEC</a></cite>] and
- <a href="http://www.ietf.org/rfc/rfc3987.txt" class="norm">Internationalized Resource
- Identifiers (IRIs)</a> [<cite><a class="bibref" rel="biblioentry" 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>TriG documents may have the strings '@prefix' or '@base' (case dependent) near the beginning of the document.</dd>
- <dt>File extension(s):</dt>
- <dd>".trig"</dd>
-
- <dt>Base URI:</dt>
- <dd>The TriG '@base <IRIref>' term can change the
-current base URI for relative IRIrefs in the query language that are
-used sequentially later in the document.</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 TriG specification is the product of the <abbr title="Resource Description Framework">RDF</abbr> WG. The <acronym title="World Wide Web Consortium">W3C</acronym> reserves change control over this specifications.</dd>
- </dl>
- </div>
-
-<div id="references" class="appendix section" typeof="bibo:Chapter" resource="#references" rel="bibo:chapter"><h2><span class="secno">C </span>References</h2><div id="normative-references" typeof="bibo:Chapter" resource="#normative-references" rel="bibo:chapter" class="section"><h3><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-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd rel="dcterms:requires">Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</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</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 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.</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 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. 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 rel="dcterms:requires">Gavin Carothers; Eric Prud'hommeaux. <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 rel="dcterms:requires">The Unicode Consortium. <a href="http://www.unicode.org/unicode/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/unicode/standard/versions/enumeratedversions.html">http://www.unicode.org/unicode/standard/versions/enumeratedversions.html</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></div><div id="informative-references" typeof="bibo:Chapter" resource="#informative-references" rel="bibo:chapter" class="section"><h3><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography" about=""><dt id="bib-RDF-SPARQL-QUERY">[RDF-SPARQL-QUERY]</dt><dd rel="dcterms:references">Andy Seaborne; Eric Prud'hommeaux. <a href="http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115"><cite>SPARQL Query Language for RDF.</cite></a> 15 January 2008. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115">http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115</a>
-</dd><dt id="bib-UNISEC">[UNISEC]</dt><dd rel="dcterms:references">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>
-</dd></dl></div></div></body></html>
\ No newline at end of file