~ updated example per conversation with Addison
authorEric Prud'hommeaux <eric@w3.org>
Wed, 12 Dec 2012 11:17:22 -0500
changeset 561 402f2133f823
parent 560 b7e8e1643336
child 562 271e78d0946f
~ updated example per conversation with Addison
rdf-turtle/index.html
--- a/rdf-turtle/index.html	Wed Dec 12 10:50:11 2012 -0500
+++ b/rdf-turtle/index.html	Wed Dec 12 11:17:22 2012 -0500
@@ -339,14 +339,14 @@
 
 				<p>
 				  Quoted 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, e.g. <code>"</code> (<span class="codepoint">U+22</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.
+				  The representation of the lexical form consists of an initial delimiter, e.g. <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.
 				  The corresponding <a href="../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="../rdf-concepts/index.html#dfn-language-tagged-string">language tag</a> is preceded by a '<code>@</code>' (<span class="codepoint">U+40</span>).
-				  If there is no language tag, there may be a <a href="../rdf-concepts/index.html#dfn-datatype-URI">datatype IRI</a>, preceeded by '<code>^^</code>' (<span class="codepoint">U+5E</span> <span class="codepoint">U+5E</span>). The datatype IRI in Turtle may be written using either an <a href="#sec-iri">absolute IRI</a>, a <a href="#sec-iri">relative IRI</a>, or <a href="#prefixed-name">prefixed name</a>. If there is no datatype IRI and no language tag, the datatype is <code>xsd:string</code>.
+				  If present, the <a href="../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="../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>). The datatype IRI in Turtle may be written using either an <a href="#sec-iri">absolute IRI</a>, a <a href="#sec-iri">relative IRI</a>, or <a href="#prefixed-name">prefixed name</a>. If there is no datatype IRI and no language tag, the datatype is <code>xsd:string</code>.
 				</p>
-				<p>'<code>\</code>' (<span class="codepoint">U+5C</span>) may not appear in any quoted literal except as part of an escape sequence. Other restrictions depend on the delimiter:</p>
+				<p>'<code>\</code>' (<span class="codepoint">U+005C</span>) may not appear in any quoted literal except as part of an escape sequence. Other restrictions depend on the delimiter:</p>
 				<ul>
-					<li>Literals delimited by <code>'</code> (<span class="codepoint">U+27</span>), may not contain the characters <code>'</code>, <code title="LINE FEED"><sub>LF</sub></code> (<span class="codepoint">U+0A</span>), or <code title="CARRIAGE RETURN"><sub>CR</sub></code> (<span class="codepoint">U+0D</span>).
+					<li>Literals delimited by <code>'</code> (<span class="codepoint">U+0027</span>), may not contain the characters <code>'</code>, <code title="LINE FEED"><sub>LF</sub></code> (<span class="codepoint">U+000A</span>), or <code title="CARRIAGE RETURN"><sub>CR</sub></code> (<span class="codepoint">U+000D</span>).
 					<li>Literals delimited by <code>"</code>, may not contain the characters <code>"</code>, <code title="LINE FEED"><sub>LF</sub></code>, or <code title="CARRIAGE RETURN"><sub>CR</sub></code>.
 					<li>Literals delimited by <code>'''</code> may not contain the sequence of characters <code>'''</code>.
 					<li>Literals delimited by <code>"""</code> may not contain the sequence of characters <code>"""</code>.
@@ -411,11 +411,11 @@
 				  </tbody>
 				</table>
  -->
-				<pre class="example"><script type="text/turtle">@prefix : <http://example.org/stats> .
-<http://somecountry.example/census2007>
-    :censusYear 2007 ;              # xsd:integer
-    :birthsPerPerson .0135 ;        # xsd:decimal
-    :gdpDollars 14074.2E9 ;         # xsd:double
+				<pre class="example"><script type="text/turtle">@prefix : <http://example.org/elements> .                                                                              
+<http://en.wikipedia.org/wiki/Helium>                                                                                  
+    :atomicNumber 2 ;               # xsd:integer                                                                      
+    :atomicMass 4.002602 ;          # xsd:decimal                                                                      
+    :specificGravity 1.663E-4 .     # xsd:double                                                                       
 				</script></pre>
 			</section>
 			<section>
@@ -437,7 +437,7 @@
 				<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+B7</code>, <code>U+300</code> to <code>U+36F</code> and <code>U+203F</code> to <code>U+2040</code> are permitted anywhere except the first 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.
@@ -546,7 +546,7 @@
 
           <p>An example of two identical triples containing literal objects
           containing newlines, written in plain and long literal forms.
-          The line breaks in this example are LINE FEED characters (U+0A).
+          The line breaks in this example are LINE FEED characters (U+000A).
           (<a href="examples/example3.ttl">example3.ttl</a>):</p>
 
           <div data-include="examples/example3.ttl" data-oninclude="updateExample"></div>
@@ -641,7 +641,7 @@
           <p>A Turtle document is a
           Unicode[[!UNICODE]]
           character string encoded in UTF-8.
-          Unicode codepoints only in the range U+0000 to U+10FFFF inclusive are
+          Unicode characters only in the range U+0000 to U+10FFFF inclusive are
           allowed.
           </p>
           <section id="sec-grammar-ws">
@@ -655,7 +655,7 @@
 
             <p>Comments in Turtle 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+0D or U+0A)
+            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.
 
@@ -703,7 +703,7 @@
 
 		    <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 codepoint in the range U+0 to U+FFFF inclusive
+		      <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>
 
@@ -711,7 +711,7 @@
 		    <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 codepoint in the range U+0 to U+10FFFF inclusive
+		      <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>
 
@@ -744,44 +744,44 @@
 
 		    <tr>
 		      <td>'\t'</td>
-		      <td>U+09</td>
+		      <td>U+0009</td>
 		    </tr>
 		    
 		    <tr>
 		      <td>'\b'</td>
-		      <td>U+08</td>
+		      <td>U+0008</td>
 		    </tr>
 		    
 		    <tr>
 
 		      <td>'\n'</td>
-		      <td>U+0A</td>
+		      <td>U+000A</td>
 		    </tr>
 		    
 		    <tr>
 		      <td>'\r'</td>
-		      <td>U+0D</td>
+		      <td>U+000D</td>
 		    </tr>
 		    
 		    <tr>
 		      <td>'\f'</td>
-		      <td>U+0C</td>
+		      <td>U+000C</td>
 		    </tr>
 		    
 		    <tr>
 		      <td>'\"'</td>
-		      <td>U+22</td>
+		      <td>U+0022</td>
 		    </tr>
 		    
 		    <tr>
 		      <td>'\''</td>
-		      <td>U+27</td>
+		      <td>U+0027</td>
 		    </tr>
 		    
 		    <tr>
 		      <td>'\\'</td>
 
-		      <td>U+5C</td>
+		      <td>U+005C</td>
 		    </tr>
 
 		  </tbody>
@@ -840,7 +840,7 @@
             	<p>Feedback, both positive and negative, is invited by sending email to mailing list <a href="mailto:[email protected]">[email protected]</a> (<a href="mailto:[email protected]?subject=subscribe">subscribe</a>, <a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">archives</a>).</p>
             </div>
             <p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
-            [[!EBNF-NOTATION]]. 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 RDF grammar</a> [[RDF-SPARQL-QUERY]]. When tokenizing the input and choosing grammar rules, the longest match is chosen. The strings <a href="#grammar-production-prefixID"><code>@prefix</code></a> and <a href="#grammar-production-base"><code>@base</code></a> match the pattern for <a href="#grammar-production-LANGTAG">LANGTAG</a>, though neither "prefix" nor "base" are <a href="http://www.iana.org/assignments/language-subtag-registry">registered language tags</a>. This specification does not define whether a quoted literal followed by either of these tokens (e.g. <code>"A"@base</code>) is in the Turtle language.
+            [[!EBNF-NOTATION]]. 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 RDF grammar</a> [[RDF-SPARQL-QUERY]]. When tokenizing the input and choosing grammar rules, the longest match is chosen. The strings <a href="#grammar-production-prefixID"><code>@prefix</code></a> and <a href="#grammar-production-base"><code>@base</code></a> match the pattern for <a href="#grammar-production-LANGTAG">LANGTAG</a>, though neither "prefix" nor "base" are <a href="http://www.iana.org/assignments/language-subtag-registry">registered language subtags</a>. This specification does not define whether a quoted literal followed by either of these tokens (e.g. <code>"A"@base</code>) is in the Turtle language.
             </p>
             <div data-include="turtle-bnf.html">
             </div>
@@ -854,7 +854,7 @@
           <a href="../rdf-concepts/index.html#dfn-iri">IRIs</a>,
           <a href="../rdf-concepts/index.html#dfn-literal">literals</a> and
           <a href="../rdf-concepts/index.html#dfn-blank-node">blank nodes</a>.
-          Literals are composed of a <a href="../rdf-concepts/index.html#dfn-lexical-form">lexical form</a> and an optional <a href="../rdf-concepts/index.html#dfn-language-identifier">language tag</a> [[!BCP47]] or datatype IRI.
+          Literals are composed of a <a href="../rdf-concepts/index.html#dfn-lexical-form">lexical form</a> and an optional <a href="../rdf-concepts/index.html#dfn-language-tag">language tag</a> [[!BCP47]] or datatype IRI.
           An extra type, <code id="prefix" class="dfn">prefix</code>, is used during parsing to map string identifiers to namespace IRIs.
 
           This section maps a string conforming to the grammar in <a href="#sec-grammar-grammar" class="sectionRef"></a> to a set of triples by mapping strings matching productions and lexical tokens to RDF terms or their components (e.g. language tags, lexical forms of literals). Grammar productions change the parser state and emit triples.</p>
@@ -892,7 +892,7 @@
               <tr id="handle-STRING_LITERAL2"      ><td><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL2"      >STRING_LITERAL2      </a></td><td><a href="../rdf-concepts/index.html#dfn-lexical-form">                         lexical form</a></td><td>The characters between the outermost '"'s are <a href="#unescape">unescaped¹</a> to form the unicode string of a lexical form.</td></tr>
               <tr id="handle-STRING_LITERAL_LONG1" ><td><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_LONG1" >STRING_LITERAL_LONG1 </a></td><td><a href="../rdf-concepts/index.html#dfn-lexical-form">                         lexical form</a></td><td>The characters between the outermost "'''"s are <a href="#unescape">unescaped¹</a> to form the unicode string of a lexical form.</td></tr>
               <tr id="handle-STRING_LITERAL_LONG2" ><td><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_LONG2" >STRING_LITERAL_LONG2 </a></td><td><a href="../rdf-concepts/index.html#dfn-lexical-form">                         lexical form</a></td><td>The characters between the outermost '"""'s are <a href="#unescape">unescaped¹</a> to form the unicode string of a lexical form.</td></tr>
-              <tr id="handle-LANGTAG"              ><td><a class="type langTag"     href="#grammar-production-LANGTAG"              >LANGTAG              </a></td><td><a href="../rdf-concepts/index.html#dfn-language-identifier">language tag</a></td><td>The characters following the "@" form the unicode string of the language tag.</td></tr>
+              <tr id="handle-LANGTAG"              ><td><a class="type langTag"     href="#grammar-production-LANGTAG"              >LANGTAG              </a></td><td><a href="../rdf-concepts/index.html#dfn-language-tag">language tag</a></td><td>The characters following the "@" form the unicode string of the language tag.</td></tr>
               <tr id="handle-RDFLiteral"           ><td><a class="type literal"     href="#grammar-production-RDFLiteral"           >RDFLiteral           </a></td><td><a href="../rdf-concepts/index.html#dfn-literal">            literal     </a></td><td>The literal has a lexical form of the first rule argument (<code>String</code>) and either a language tag of <code>LANGTAG</code> or a datatype IRI of <code>iri</code>, depending on which rule matched the input. if neither a language tag nor a datatype IRI is provided, the literal has a datatype of xsd:string.</td></tr>
               <tr id="handle-INTEGER"              ><td><a class="type integer"     href="#grammar-production-INTEGER"              >INTEGER              </a></td><td><a href="../rdf-concepts/index.html#dfn-literal">            literal     </a></td><td>The literal has a lexical form of the input string, and a datatype of xsd:integer.</td></tr>
               <tr id="handle-DECIMAL"              ><td><a class="type decimal"     href="#grammar-production-DECIMAL"              >DECIMAL              </a></td><td><a href="../rdf-concepts/index.html#dfn-literal">            literal     </a></td><td>The literal has a lexical form of the input string, and a datatype of xsd:decimal.</td></tr>
@@ -1046,7 +1046,7 @@
 
           <dt>Encoding considerations:</dt>
           <dd>The syntax of Turtle is expressed over code points in Unicode [[!UNICODE]]. The encoding is always UTF-8 [[!UTF-8]].</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-Fa-f]</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>Turtle 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 [[!RFC3023]] 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>