Skip to content

Commit f3910f1

Browse files
committed
Synch changes from Turtle/N-Triples/N-Quads
1 parent 3822f4c commit f3910f1

1 file changed

Lines changed: 31 additions & 13 deletions

File tree

spec/index.html

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
.separated thead tr th { border:1px solid black; padding: .2em; min-width: 10vw }
6868
.separated tbody tr td { border:1px solid black; text-align: center; min-width: 10vw }
6969
.separated tbody tr td.r { text-align: right; padding: .5em; }
70+
.separated tbody tr td:first-child,
71+
.separated tbody tr td:last-child {text-align: left; padding: .5em; }
72+
.separated.last-center tbody tr td:last-child {text-align: center; padding: .5em; }
7073
.grammar td {
7174
font-family: Menlo, Consolas, "DejaVu Sans Mono", Monaco, monospace;
7275
font-size: .9em;
@@ -101,12 +104,14 @@
101104
table.ex { font-size: 1.4vw; }
102105
.separated tbody tr td:first-child, .separated tbody tr th:first-child {max-width: 220px; overflow-wrap: anywhere;}
103106
}
107+
table.simple { border-collapse:collapse;}
108+
table.simple th, table.simple td { border:1px solid black; padding:0.2em; }
104109

105110
table.cp-definitions { border-collapse:collapse; background-color: #DDDDFF}
106111

107112
table.cp-definitions,
108113
table.cp-definitions th { text-align: center; padding:0.2em; padding-left: 0.3em; padding-right: 0.3em; }
109-
table.cp-definitions td { border: 1px solid black; padding: 0.2em; padding-left: 0.3em; padding-right: 0.3em; }
114+
table.cp-definitions td { border: 0px solid black; padding: 0.2em; padding-left: 0.3em; padding-right: 0.3em; }
110115
table.cp-definitions td:nth-child(2) { text-align: center; }
111116
</style>
112117
</head>
@@ -420,8 +425,8 @@ <h3>Comments</h3>
420425
<a href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE"><code>STRING_LITERAL_LONG_SINGLE_QUOTE</code></a>, or
421426
<a href="#grammar-production-STRING_LITERAL_LONG_QUOTE" ><code>STRING_LITERAL_LONG_QUOTE</code></a>,
422427
and continue to the end of line (marked by
423-
<a href="#cp-line-feed"><code title="line feed">LF</code></a>, or
424-
<a href="#cp-carriage-return"><code title="carriage return">CR</code></a>),
428+
<a href="#cp-line-feed"><code title="line feed">LFs</code></a>, or
429+
<a href="#cp-carriage-return"><code title="carriage return">CRs</code></a>),
425430
or end of file if there is no end of line after the comment marker.
426431
Comments are treated as white space.</p>
427432
</section>
@@ -613,7 +618,7 @@ <h3>Escape Sequences</h3>
613618

614619
</ul>
615620

616-
<table id="term2escape" class="separated">
621+
<table id="term2escape" class="separated last-center">
617622
<caption>Context where each kind of escape sequence can be used</caption>
618623
<thead>
619624
<tr>
@@ -818,7 +823,7 @@ <h2>Selected Terminal Literal Strings</h2>
818823
<dd>three concatenated quotation mark characters, each having the code point <code class="codepoint">U+0022</code></dd>
819824
<dt id="cp-triple-apostrophe"><code>'''</code></dt>
820825
<dd>three concatenated apostrophe characters, each having the code point <code class="codepoint">U+0027</code></dd>
821-
<dt id="cp-hyphen-hyphen"><code>--</code></dt>
826+
<dt id="cp-hyphen-hyphen" style="white-space: nowrap"><code>--</code></dt>
822827
<dd>two concatenated <a href="#cp-hyphen"><code title="hyphen">-</code></a> characters</dd>
823828
</dl>
824829
</section>
@@ -830,7 +835,7 @@ <h2>Parsing</h2>
830835
specification defines four types of <a data-cite="RDF12-CONCEPTS#dfn-rdf-term">RDF term</a>:
831836

832837
<a data-cite="RDF12-CONCEPTS#dfn-iri">IRIs</a>,
833-
<a data-cite="RDF12-CONCEPTS#dfn-literal">literals</a>,
838+
<a data-cite="RDF12-CONCEPTS#dfn-rdf-literal">literals</a>,
834839
<a data-cite="RDF12-CONCEPTS#dfn-blank-node">blank nodes</a>, and
835840
<a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple terms</a>.
836841

@@ -919,21 +924,21 @@ <h3>RDF Term Constructors</h3>
919924
<tr> <th> production </th><th> type </th><th>procedure</th></tr>
920925
</thead>
921926
<tbody>
922-
<tr id="handle-IRIREF" ><td style="text-align:left;" ><a class="type IRI" href="#grammar-production-IRIREF" >IRIREF </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-iri" >IRI </a></td><td>The characters between "&lt;" and "&gt;" are taken, after the <a>numeric escape sequences</a> are processed, to form the Unicode string of the IRI. <a data-cite="RDF12-CONCEPTS#dfn-relative-iri">Relative IRI reference</a> resolution is performed per <a href="#sec-iri-references" class="sectionRef"></a>.</td></tr>
927+
<tr id="handle-IRIREF" ><td style="text-align:left;" ><a class="type IRI" href="#grammar-production-IRIREF" >IRIREF </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-iri" >IRI </a></td><td>The characters between <a href="#cp-less-than"><code title="less-than sign">&lt;</code></a> and <a href="#cp-greater-than"><code title="greater-than sign">&gt;</code></a> are taken, with the <a data-lt="numeric escape sequence">numeric escape sequences</a> unescaped, to form the IRI. <a data-cite="RDF12-CONCEPTS#dfn-relative-iri">Relative IRI reference</a> resolution is performed per <a href="#sec-iri-references" class="sectionRef">Section 6.3</a>. The resulting IRI MUST comply with the <a data-cite="RFC3987#section-2.2">syntactic restrictions</a> of generic IRI syntax, and SHOULD conform to <a data-cite="RFC3986#section-3.3">section 3.3</a> of [[RFC3986]] and comply with any narrower restrictions imposed by the corresponding IRI scheme specification.</td></tr>
923928
<tr id="handle-PNAME_NS" ><td style="text-align:left;" rowspan="2"><a class="type string" href="#grammar-production-PNAME_NS" >PNAME_NS </a></td><td><a href="#prefix" >prefix </a></td><td>When used in a <a href="#grammar-production-prefixID"><code>prefixID</code></a> or <a href="#grammar-production-sparqlPrefix"><code>sparqlPrefix</code></a> production, the <code>prefix</code> is the potentially empty Unicode string matching the first argument of the rule is a key into the <a href="#namespaces">namespaces map</a>.</td></tr>
924929
<tr id="handle-PNAME-IRI" > <td><a data-cite="RDF12-CONCEPTS#dfn-iri" >IRI </a></td><td>When used in a <a href="#grammar-production-PrefixedName"><code>PrefixedName</code></a> production, the <code>iri</code> is the value in the <a href="#namespaces">namespaces map</a> corresponding to the first argument of the rule.</td></tr>
925930
<tr id="handle-PNAME_LN" ><td style="text-align:left;" ><a class="type IRI" href="#grammar-production-PNAME_LN" >PNAME_LN </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-iri" >IRI </a></td><td>A potentially empty <a href="#prefix">prefix</a> is identified by the first sequence, <a href="#grammar-production-PNAME_NS"><code>PNAME_NS</code></a>. The <a href="#namespaces">namespaces map</a> <em class="rfc2119">MUST</em> have a corresponding <code>namespace</code>. The Unicode string of the IRI is formed by unescaping the <a data-lt="reserved character escape sequence">reserved characters</a> in the second argument, <a href="#grammar-production-PN_LOCAL"><code>PN_LOCAL</code></a>, and concatenating this onto the <code>namespace</code>.</td></tr>
926-
<tr id="handle-VersionSpecifier" ><td style="text-align:left;" ><a class="type literal" href="#grammar-production-VersionSpecifier" >VersionSpecifier </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-literal" >literal </a></td><td>The |curVersion| is taken from a literal using the matched <a data-cite="RDF12-CONCEPTS#dfn-rdf-string">RDF string</a> lexical form and `xsd:string` datatype.</td></tr>
931+
<tr id="handle-VersionSpecifier" ><td style="text-align:left;" ><a class="type literal" href="#grammar-production-VersionSpecifier" >VersionSpecifier </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-rdf-literal" >literal </a></td><td>The |curVersion| is taken from a literal using the matched <a data-cite="RDF12-CONCEPTS#dfn-rdf-string">RDF string</a> lexical form and `xsd:string` datatype.</td></tr>
927932
<tr id="handle-STRING_LITERAL_SINGLE_QUOTE" ><td style="text-align:left;" ><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE" >STRING_LITERAL_SINGLE_QUOTE </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-lexical-form">lexical form</a></td><td>The characters between the outermost <a href="#cp-apostrophe"><code title="apostrophe">'</code></a>s are taken, with <a data-lt="numeric escape sequence">numeric</a> and <a data-lt="string escape sequence">string</a> escape sequences unescaped, to form the Unicode string of a lexical form.</td></tr>
928933
<tr id="handle-STRING_LITERAL_QUOTE" ><td style="text-align:left;" ><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_QUOTE" >STRING_LITERAL_QUOTE </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-lexical-form">lexical form</a></td><td>The characters between the outermost <a href="#cp-quotation-mark"><code title="quotation mark">&quot;</code></a>s are taken, with <a data-lt="numeric escape sequence">numeric</a> and <a data-lt="string escape sequence">string</a> escape sequences unescaped, to form the Unicode string of a lexical form.</td></tr>
929934
<tr id="handle-STRING_LITERAL_LONG_SINGLE_QUOTE"><td style="text-align:left;" ><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">STRING_LITERAL_LONG_SINGLE_QUOTE</a></td><td><a data-cite="RDF12-CONCEPTS#dfn-lexical-form">lexical form</a></td><td>The characters between the outermost <a href="#cp-triple-apostrophe"><code>'''</code></a>s are taken, with <a data-lt="numeric escape sequence">numeric</a> and <a data-lt="string escape sequence">string</a> escape sequences unescaped, to form the unicode string of a lexical form.</td></tr>
930935
<tr id="handle-STRING_LITERAL_LONG_QUOTE" ><td style="text-align:left;" ><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_LONG_QUOTE" >STRING_LITERAL_LONG_QUOTE. </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-lexical-form">lexical form</a></td><td>The characters between the outermost <a href="#cp-triple-quote"><code>"""</code></a>s are taken, with <a data-lt="numeric escape sequence">numeric</a> and <a data-lt="string escape sequence">string</a> escape sequences unescaped, to form the Unicode string of a lexical form.</td></tr>
931936
<tr id="handle-LANG_DIR" ><td style="text-align:left;" ><a class="type langDir" href="#grammar-production-LANG_DIR" >LANG_DIR </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-language-tag">language tag</a></td><td>The characters following the <a href="#cp-at-sign"><code title="at sign">@</code></a> form the <a data-cite="RDF12-CONCEPTS#dfn-language-tag">language tag</a> and optionally the <a data-cite="RDF12-CONCEPTS#dfn-base-direction">initial text direction</a>, if the matched characters include <a href="#cp-hyphen-hyphen"><code>--</code></a>.</td></tr>
932-
<tr id="handle-RDFLiteral" ><td style="text-align:left;" ><a class="type literal" href="#grammar-production-RDFLiteral" >RDFLiteral </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-literal" >literal </a></td><td>The literal has a lexical form of the first rule argument, <a href="#grammar-production-String"><code>String</code></a>. If the <code>'^^' iri</code> rule is matched, the <a data-cite="RDF12-CONCEPTS#dfn-datatype-iri">datatype IRI</a> is derived from the <code>iri</code>, and the literal has no language tag. If the <a href="#grammar-production-LANG_DIR" class="type langDir"><code>LANG_DIR</code></a> rule is matched, the <a data-cite="RDF12-CONCEPTS#dfn-language-tag">language tag</a> and <a data-cite="RDF12-CONCEPTS#dfn-base-direction">initial text direction</a> are taken from <a href=#handle-LANG_DIR class="type langDir"><code>LANG_DIR</code></a>. If there is no <a data-cite="RDF12-CONCEPTS#dfn-base-direction">initial text direction</a>, the datatype is <code>rdf:langString</code>. If there is an <a data-cite="RDF12-CONCEPTS#dfn-base-direction">initial text direction</a>, the datatype is <code>rdf:dirLangString</code>. If neither matched, the datatype is <code>xsd:string</code>, and the literal has no language tag.</td></tr>
933-
<tr id="handle-INTEGER" ><td style="text-align:left;" ><a class="type integer" href="#grammar-production-INTEGER" >INTEGER </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-literal" >literal </a></td><td>The literal has a lexical form of the input string, and a datatype of <code>xsd:integer</code>.</td></tr>
934-
<tr id="handle-DECIMAL" ><td style="text-align:left;" ><a class="type decimal" href="#grammar-production-DECIMAL" >DECIMAL </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-literal" >literal </a></td><td>The literal has a lexical form of the input string, and a datatype of <code>xsd:decimal</code>.</td></tr>
935-
<tr id="handle-DOUBLE" ><td style="text-align:left;" ><a class="type double" href="#grammar-production-DOUBLE" >DOUBLE </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-literal" >literal </a></td><td>The literal has a lexical form of the input string, and a datatype of <code>xsd:double</code>.</td></tr>
936-
<tr id="handle-BooleanLiteral" ><td style="text-align:left;" ><a class="type boolean" href="#grammar-production-BooleanLiteral" >BooleanLiteral </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-literal" >literal </a></td><td>The literal has a lexical form of the <code>true</code> or <code>false</code>, depending on which matched the input, and a datatype of <code>xsd:boolean</code>.</td></tr>
937+
<tr id="handle-RDFLiteral" ><td style="text-align:left;" ><a class="type literal" href="#grammar-production-RDFLiteral" >RDFLiteral </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-rdf-literal" >literal </a></td><td>The literal has a lexical form of the first rule argument, <a href="#grammar-production-String"><code>String</code></a>. If the <code>'^^' iri</code> rule is matched, the <a data-cite="RDF12-CONCEPTS#dfn-datatype-iri">datatype IRI</a> is derived from the <code>iri</code>, and the literal has no language tag. If the <a href="#grammar-production-LANG_DIR" class="type langDir"><code>LANG_DIR</code></a> rule is matched, the <a data-cite="RDF12-CONCEPTS#dfn-language-tag">language tag</a> and <a data-cite="RDF12-CONCEPTS#dfn-base-direction">initial text direction</a> are taken from <a href=#handle-LANG_DIR class="type langDir"><code>LANG_DIR</code></a>. If there is no <a data-cite="RDF12-CONCEPTS#dfn-base-direction">initial text direction</a>, the datatype is <code>rdf:langString</code>. If there is an <a data-cite="RDF12-CONCEPTS#dfn-base-direction">initial text direction</a>, the datatype is <code>rdf:dirLangString</code>. If neither matched, the datatype is <code>xsd:string</code>, and the literal has no language tag.</td></tr>
938+
<tr id="handle-INTEGER" ><td style="text-align:left;" ><a class="type integer" href="#grammar-production-INTEGER" >INTEGER </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-rdf-literal" >literal </a></td><td>The literal has a lexical form of the input string, and a datatype of <code>xsd:integer</code>.</td></tr>
939+
<tr id="handle-DECIMAL" ><td style="text-align:left;" ><a class="type decimal" href="#grammar-production-DECIMAL" >DECIMAL </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-rdf-literal" >literal </a></td><td>The literal has a lexical form of the input string, and a datatype of <code>xsd:decimal</code>.</td></tr>
940+
<tr id="handle-DOUBLE" ><td style="text-align:left;" ><a class="type double" href="#grammar-production-DOUBLE" >DOUBLE </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-rdf-literal" >literal </a></td><td>The literal has a lexical form of the input string, and a datatype of <code>xsd:double</code>.</td></tr>
941+
<tr id="handle-BooleanLiteral" ><td style="text-align:left;" ><a class="type boolean" href="#grammar-production-BooleanLiteral" >BooleanLiteral </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-rdf-literal" >literal </a></td><td>The literal has a lexical form of the <code>true</code> or <code>false</code>, depending on which matched the input, and a datatype of <code>xsd:boolean</code>.</td></tr>
937942
<tr id="handle-BLANK_NODE_LABEL" ><td style="text-align:left;" ><a class="type bNode" href="#grammar-production-BLANK_NODE_LABEL" >BLANK_NODE_LABEL </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-blank-node" >blank node </a></td><td>The string matching the second argument, <a href="#grammar-production-PN_LOCAL"><code>PN_LOCAL</code></a>, is a key in <a href="#bnodeLabels">bnodeLabels</a>. If there is no corresponding blank node in the map, one is allocated.</td></tr>
938943
<tr id="handle-ANON" ><td style="text-align:left;" ><a class="type bNode" href="#grammar-production-ANON" >ANON </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-blank-node" >blank node </a></td><td>A blank node is generated.</td></tr>
939944
<tr id="handle-blankNodePropertyList" ><td style="text-align:left;" ><a class="type bNode" href="#grammar-production-blankNodePropertyList" >blankNodePropertyList </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-blank-node" >blank node </a></td><td>A blank node is generated. Note the rules for <code>blankNodePropertyList</code> in the next section.</td></tr>
@@ -972,7 +977,20 @@ <h3>RDF Term Constructors</h3>
972977
</tr>
973978
</tbody>
974979
</table>
980+
981+
<p class="note">As processors which detect errors on input can result in
982+
graphs which contain fewer triples than are described in the input
983+
(including no triples whatsoever),
984+
consumers should consider information of any errors signaled
985+
when using the output triples,
986+
which may be incomplete and/or include
987+
<a data-cite="RDF12-CONCEPTS#dfn-ill-typed">ill-typed</a>
988+
or ill-formed terms.</p>
989+
990+
991+
975992
</section>
993+
976994

977995
<section id="sec-parsing-triples">
978996
<h3>RDF Triples Construction</h3>

0 commit comments

Comments
 (0)