+ plain literal as xsd:string
authorEric Prud'hommeaux <eric@w3.org>
Tue, 05 Jul 2011 08:31:56 -0400
changeset 57 4889dacbf30b
parent 56 4030b238f3f0
child 58 4fbeffaba01d
child 84 6c25a463a014
+ plain literal as xsd:string
+ escape chars in language
+ escapes on QNames
rdf-turtle/index.html
rdf-turtle/turtle-bnf.html
--- a/rdf-turtle/index.html	Sat Jun 11 13:08:41 2011 -0700
+++ b/rdf-turtle/index.html	Tue Jul 05 08:31:56 2011 -0400
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
     <head>
 	<title>Turtle</title>
 	<meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
@@ -219,11 +219,13 @@
 """
 				</pre>
 
-				<p>Literals may be given either a language suffix or a datatype URI
+				<p>Literals have either a language suffix or a datatype URI
 				but not both.  Languages are indicated by appending the simple
 				literal with <code>@</code> and the language tag.  Datatype URIs
 				similarly append <code>^^</code> followed by any legal URI form (full
-				or qualified) as described above to give the datatype URI.
+				or qualified) as described above to give the datatype URI. <span class="non-issue">Literals
+				may be written without either a language tag or a datatype URI as a
+				shortcut for a literal with the type xsd:string.</span>
 				</p>
 
 				<pre class="example">
@@ -236,6 +238,14 @@
 """10"""^^xsd:decimal
 				</pre>
 
+				<p>
+				  The <code>"chat"</code> above is equivalent to <code>"chat"^^xsd:string</code>.
+				</p>
+
+				<p class="issue">
+				  The RDF Working Group is currently examining a simplification of RDF which considers plain literals with no language tag to be literals with a datatype <code>xsd:string</code>.
+				</p>
+
 				<p>Blank nodes are written as <code>_:</code><em>BLANK_NODE_LABEL</em>
 				to provide a blank node either from the given <a href="#prod-turtle2-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a>.
 				A generated blank node may also be made with <code>[]</code>
@@ -252,7 +262,7 @@
 				</pre>
 
 
-				<p>Literals and URIs may also contain escapes to encode surrounding
+				<p>Literals <span class="non-issue">, QNames </span>and URIs may also contain escapes to encode surrounding
 				syntax, non-printable characters and to encode Unicode characters by
 				codepoint number (although they may also be given directly, encoded
 				as UTF-8).  The character escapes are:</p>
@@ -275,6 +285,11 @@
 				</ul>
 
 				<p>See the <a href="#sec-strings">String escapes</a> section for full details.</p>
+
+				<p class="issue">
+				  The inclusion of escape sequences in QNames is undecided.
+				</p>
+
 			</section>
 			<section id="uris">
 				<h3>Abbreviating URIs</h3>
--- a/rdf-turtle/turtle-bnf.html	Sat Jun 11 13:08:41 2011 -0700
+++ b/rdf-turtle/turtle-bnf.html	Tue Jul 05 08:31:56 2011 -0400
@@ -273,7 +273,7 @@
 <td><a name="term-turtle2-IRI_REF" id="term-turtle2-IRI_REF"></a>[<span class="prodNo">28</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">IRI_REF</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
-<td><code class="content">"&lt;" (( [^&lt;&gt;\"{}|^`\\] - [#0000- ] ))* "&gt;"</code></td>
+<td><code class="content">"&lt;" (( [^&lt;&gt;\"{}|^`\\] - [#0000- ] ) | <span class="prod"><a href="#prod-turtle2-UCHAR" class="grammarRef">UCHAR</a></span> )* "&gt;"</code></td>
 </tr>
 </tbody>
 
@@ -431,7 +431,7 @@
 <td><a name="term-turtle2-STRING_LITERAL1" id="term-turtle2-STRING_LITERAL1"></a>[<span class="prodNo">45</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">STRING_LITERAL1</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
-<td><code class="content">"'" (( ( [^'\\\n\r] ) | <span class="prod"><a href="#prod-turtle2-ECHAR" class="grammarRef">ECHAR</a></span> ))* "'"</code></td>
+<td><code class="content">"'" (( ( [^'\\\n\r] ) | <span class="prod"><a href="#prod-turtle2-ECHAR" class="grammarRef">ECHAR</a></span> | <span class="prod"><a href="#prod-turtle2-UCHAR" class="grammarRef">UCHAR</a></span> ))* "'"</code></td>
 </tr>
 </tbody>
 
@@ -440,7 +440,7 @@
 <td><a name="term-turtle2-STRING_LITERAL2" id="term-turtle2-STRING_LITERAL2"></a>[<span class="prodNo">46</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">STRING_LITERAL2</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
-<td><code class="content">'"' (( ( [^\"\\\n\r] ) | <span class="prod"><a href="#prod-turtle2-ECHAR" class="grammarRef">ECHAR</a></span> ))* '"'</code></td>
+<td><code class="content">'"' (( ( [^\"\\\n\r] ) | <span class="prod"><a href="#prod-turtle2-ECHAR" class="grammarRef">ECHAR</a></span> | <span class="prod"><a href="#prod-turtle2-UCHAR" class="grammarRef">UCHAR</a></span> ))* '"'</code></td>
 </tr>
 </tbody>
 
@@ -449,7 +449,7 @@
 <td><a name="term-turtle2-STRING_LITERAL_LONG1" id="term-turtle2-STRING_LITERAL_LONG1"></a>[<span class="prodNo">47</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">STRING_LITERAL_LONG1</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
-<td><code class="content">"'''" (( (( "'" | "''" ))? ( [^'\\] | <span class="prod"><a href="#prod-turtle2-ECHAR" class="grammarRef">ECHAR</a></span> ) ))* "'''"</code></td>
+<td><code class="content">"'''" (( (( "'" | "''" ))? ( [^'\\] | <span class="prod"><a href="#prod-turtle2-ECHAR" class="grammarRef">ECHAR</a></span> | <span class="prod"><a href="#prod-turtle2-UCHAR" class="grammarRef">UCHAR</a></span> ) ))* "'''"</code></td>
 </tr>
 </tbody>
 
@@ -458,7 +458,17 @@
 <td><a name="term-turtle2-STRING_LITERAL_LONG2" id="term-turtle2-STRING_LITERAL_LONG2"></a>[<span class="prodNo">48</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">STRING_LITERAL_LONG2</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
-<td><code class="content">'"""' (( (( '"' | '""' ))? ( [^\"\\] | <span class="prod"><a href="#prod-turtle2-ECHAR" class="grammarRef">ECHAR</a></span> ) ))* '"""'</code></td>
+<td><code class="content">'"""' (( (( '"' | '""' ))? ( [^\"\\] | <span class="prod"><a href="#prod-turtle2-ECHAR" class="grammarRef">ECHAR</a></span> | <span class="prod"><a href="#prod-turtle2-UCHAR" class="grammarRef">UCHAR</a></span> ) ))* '"""'</code></td>
+</tr>
+</tbody>
+
+<tbody class="term">
+<tr valign="baseline">
+<td><a name="term-turtle2-UCHAR" id="term-turtle2-UCHAR"></a>[<span class="prodNo">49</span>]&nbsp;&nbsp;&nbsp;</td>
+<td>&lt;<code class="production term">UCHAR</code>&gt;</td>
+<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+<td><code class="content">( "\\u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] )<br>
+| ( "\\U" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] )</code></td>
 </tr>
 </tbody>
 
@@ -519,7 +529,8 @@
 | [#3001-#D7FF]<br>
 | [#F900-#FDCF]<br>
 | [#FDF0-#FFFD]<br>
-| [#10000-#EFFFF]</code></td>
+| [#10000-#EFFFF]<br>
+| <span class="prod"><a href="#prod-turtle2-UCHAR" class="grammarRef">UCHAR</a></span></code></td>
 </tr>
 </tbody>