Whitespace rules for N-Triples
authorGavin Carothers <gavin@carothers.name>
Tue, 15 May 2012 13:41:14 -0700
changeset 387 720934b1d472
parent 385 7a998fe9dd9b
child 388 5236482bc571
Whitespace rules for N-Triples
rdf-turtle/index.html
rdf-turtle/n-prime-bnf.html
rdf-turtle/n-prime.bnf
--- a/rdf-turtle/index.html	Tue May 15 11:40:45 2012 -0700
+++ b/rdf-turtle/index.html	Tue May 15 13:41:14 2012 -0700
@@ -1057,14 +1057,10 @@
         <h2>N-Triples</h2>
         <p>This section defines an easy to parse line-based subset of Turtle named N-Triples.</p>
         <p>The syntax is a revised version of N-Triples as originally defined in the RDF Test Cases [[!RDF-TESTCASES]] 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. This sequence is terminated by a '.' and a new line (optional at the end of a document).
-			</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
--- a/rdf-turtle/n-prime-bnf.html	Tue May 15 11:40:45 2012 -0700
+++ b/rdf-turtle/n-prime-bnf.html	Tue May 15 13:41:14 2012 -0700
@@ -44,11 +44,11 @@
     <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 id="n-triples-grammar-production-EOL" data-grammar-original="[8]  EOL                ::= [\r\n]+" data-grammar-expression="(&#x27;+&#x27;, (&#x27;[&#x27;, &#x27;\\r\\n&#x27;))" class='grammar-token'>
+            <tr id="n-triples-grammar-production-EOL" data-grammar-original="[8]  EOL                ::= [#xD#xA]+" data-grammar-expression="(&#x27;+&#x27;, (&#x27;[&#x27;, &#x27;#xD#xA&#x27;))" class='grammar-token'>
     <td>[8]<td>
     <td><code>EOL</code><td>
     <td>::=</td>
-    <td>([<code class='grammar-chars'>\r\n</code>])<code class='grammar-plus'>+</code></td>
+    <td>([<code class='grammar-chars'>#xD#xA</code>])<code class='grammar-plus'>+</code></td>
 </tr>
             <tr id="n-triples-grammar-production-IRIREF" data-grammar-original="[132s] IRIREF           ::= &#x27;&lt;&#x27; ([^&lt;&gt;&quot;{}|^`\]-[#x00-#x20])* | UCHAR &#x27;&gt;&#x27;" data-grammar-expression="(&#x27;|&#x27;, [(&#x27;,&#x27;, [(&quot;&#x27;&quot;, &#x27;&lt;&#x27;), (&#x27;*&#x27;, (&#x27;-&#x27;, [(&#x27;[&#x27;, &#x27;^&lt;&gt;&quot;{}|^`\\&#x27;), (&#x27;[&#x27;, &#x27;#x00-#x20&#x27;)]))]), (&#x27;,&#x27;, [(&#x27;id&#x27;, &#x27;UCHAR&#x27;), (&quot;&#x27;&quot;, &#x27;&gt;&#x27;)])])" class='grammar-token'>
     <td>[132s]<td>
--- a/rdf-turtle/n-prime.bnf	Tue May 15 11:40:45 2012 -0700
+++ b/rdf-turtle/n-prime.bnf	Tue May 15 13:41:14 2012 -0700
@@ -8,7 +8,7 @@
 @terminals
 [7]  LANG               ::= [a-zA-Z]+ ( "-" [a-zA-Z0-9]+ )*
 
-[8]  EOL                ::= [\r\n]+
+[8]  EOL                ::= [#xD#xA]+
 
 [132s] IRIREF           ::= '<' ([^<>"{}|^`\]-[#x00-#x20])* | UCHAR '>'
 [135s] BLANK_NODE_LABEL ::= '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)?