Add SPARQL style BASE and PREFIX
authorGavin Carothers <gavin@carothers.name>
Sat, 16 Jun 2012 15:05:01 -0700
changeset 459 e2f49b33c6c5
parent 458 efcf7e8a6272
child 460 f5c48c0dfa2c
Add SPARQL style BASE and PREFIX
rdf-turtle/index.html
rdf-turtle/turtle.bnf
--- a/rdf-turtle/index.html	Sat Jun 16 09:45:46 2012 -0700
+++ b/rdf-turtle/index.html	Sat Jun 16 15:05:01 2012 -0700
@@ -171,7 +171,7 @@
     rel:enemyOf <#green-goblin> ;
     a foaf:Person ;
     foaf:name "Spiderman", "Spïdermann"@de .</script></pre>
-
+<img src="spiderman.png"/>
 			<p>
 			  This example introduces many of features of the Turtle language:
 <a href="#relative-iris">@base and Relative IRIs</a>,
--- a/rdf-turtle/turtle.bnf	Sat Jun 16 09:45:46 2012 -0700
+++ b/rdf-turtle/turtle.bnf	Sat Jun 16 15:05:01 2012 -0700
@@ -1,12 +1,15 @@
 [1] turtleDoc ::= statement* 
  
-[2] statement ::= directive "." 
+[2] statement ::= directive 
  | triples "." 
 [3] directive ::= prefixID 
- | base 
-[4] prefixID ::= '@prefix' PNAME_NS IRIREF 
+ | base | sparqlPrefix | sparqlBase
+[4] prefixID ::= '@prefix' PNAME_NS IRIREF "."
  
-[5] base ::= '@base' IRIREF 
+[5] base ::= '@base' IRIREF "."
+
+[28*] sparqlPrefix ::= [Pp][Rr][Ee][Ff][Xx] PNAME_NS IRIREF
+[29*] sparqlBase	::= [Bb][Aa][Ss][Ee] IRIREF
  
 [6] triples ::= subject predicateObjectList |
 blankNodePropertyList predicateObjectList?