changed examples to SPARQL-style syntax
authorGuus Schreiber <guus.schreiber@vu.nl>
Mon, 16 Dec 2013 13:29:38 +0100
changeset 1605 8b40f4316100
parent 1604 6e92062d1c5b
child 1606 e71ed6a16cac
changed examples to SPARQL-style syntax
rdf-primer/index.html
--- a/rdf-primer/index.html	Mon Dec 16 10:28:50 2013 +0100
+++ b/rdf-primer/index.html	Mon Dec 16 13:29:38 2013 +0100
@@ -655,12 +655,12 @@
       represented in Turtle as follows:</p>
 
       <pre class="example" id="turtle-example">
-01    @base &lt;http://example.org/&gt; .
-02    @prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
-03    @prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .
-04    @prefix schema: &lt;http://schema.org/&gt; .
-05    @prefix dcterms: &lt;http://purl.org/dc/terms/&gt; .
-06    @prefix wd: &lt;http://www.wikidata.org/entity/&gt; .
+01    BASE   &lt;http://example.org/&gt;
+02    PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
+03    PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
+04    PREFIX schema: &lt;http://schema.org/&gt;
+05    PREFIX dcterms: &lt;http://purl.org/dc/terms/&gt;
+06    PREFIX wd: &lt;http://www.wikidata.org/entity/&gt;
 07 
 08    &lt;bob#me&gt;
 09        a foaf:Person ;
@@ -684,18 +684,16 @@
 be use for prefixed names (such as <code>foaf:Person</code>) instead of full IRIs.
 The corresponding IRI is constructed by replacing the prefix with its
 corresponding IRI (in this example <code>foaf:Person</code> stands for
-<code>&lt;http://xmlns.com/foaf/0.1/Person&gt;</code>). A period is used to
-signal the end of a Turtle statement. </p>
-
-<p class="issue">
-Use SPARQL-style prefix?
-</p>
+<code>&lt;http://xmlns.com/foaf/0.1/Person&gt;</code>).</p>
 
 <p>Lines 8-12 show how Turtle provides a shorthand for a set of
 triples with the same subject. Lines 9-12 specify the predicate-object
 part of triples with <code>&lt;http://example.org/bob#me&gt;</code> as
 subject. The semicolons at the end of lines 9-11 indicate that the
-set is not yet complete. The triple represented by line 10 looks in
+set is not yet complete. A period is used to
+signal the end of a Turtle statement.</p>
+
+<P>The triple represented by line 10 looks in
 its expanded form like this (see the <a href="#subsection-ntriples">N-Triples example</a>
 for the expanded form of the full example):</p> 
 <pre>
@@ -707,8 +705,8 @@
 <code>a</code> predicate 
 is a shorthand for the property <code>rdf:type</code> which models the
 instance relation (see Table <a href="#table-rdf-schema">"RDF Schema
-constructs"</a>). The <code> a</code> shorthand is intended to match the human
-intuition about <code>rdf:type</code>. <p>
+constructs"</a>). The <code>a</code> shorthand is intended to match the human
+intuition about <code>rdf:type</code>. </p>
 
 <p>In line 11 we see an example of a literal, in this case a date. The
 datatype is appended to the literal through a <code>^^</code> delimiter. The date
@@ -743,7 +741,7 @@
 earlier cypress-tree example:</p>  
 
 <pre class="example">
-  @prefix lio: &lt;http://purl.org/net/lio#&gt; . 
+  PREFIX lio: &lt;http://purl.org/net/lio#&gt; 
 
   &lt;http://dbpedia.org/resource/Mona_Lisa&gt; lio:shows _:x .
   _:x a &lt;http://dbpedia.org/resource/Cypress&gt; .
@@ -776,14 +774,14 @@
       can be specified in TriG as follows:</p>
 
       <pre class="example" id="trig-example">
-01    @base &lt;http://example.org/&gt; .
-02    @prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
-03    @prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .
-04    @prefix schema: &lt;http://schema.org/&gt; .
-05    @prefix dcterms: &lt;http://purl.org/dc/terms/&gt; .
-06    @prefix wd: &lt;http://www.wikidata.org/entity/&gt; .
+01    BASE   &lt;http://example.org/&gt; 
+02    PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt; 
+03    PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; 
+04    PREFIX schema: &lt;http://schema.org/&gt; 
+05    PREFIX dcterms: &lt;http://purl.org/dc/terms/&gt; 
+06    PREFIX wd: &lt;http://www.wikidata.org/entity/&gt; 
 07    
-08    &lt;http://example.org/bob&gt;
+08    GRAPH &lt;http://example.org/bob&gt;
 09      {
 10        &lt;bob#me&gt;
 11            a foaf:Person ;
@@ -792,7 +790,7 @@
 14            foaf:topic_interest wd:Q12418 .
 15      }
 16
-17    &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt;
+17    GRAPH &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt;
 18      {
 19        wd:Q12418
 20            dcterms:title "Mona Lisa" ;