--- a/rdf-primer/index.html Wed Aug 14 13:22:33 2013 +0100
+++ b/rdf-primer/index.html Wed Aug 14 13:39:36 2013 +0100
@@ -498,10 +498,7 @@
<h2>Writing RDF datasets</h2>
- <p>Among the previous syntaxes, only JSON-LD provides support for RDF datasets (collections of graphs).
- There are two syntaxes dedicated to serializing and exchanging RDF datasets:
- <a href="https://dvcs.w3.org/hg/rdf/raw-file/default/nquads/index.html">N-Quads</a> and
- <a href="https://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html">TriG</a>, which we summarize below.</p>
+ <p>Syntaxes are also available to serialize and exchange RDF datasets (collections of graphs).</p>
<section id="subsection-nquads">
@@ -509,11 +506,19 @@
<p><a href="https://dvcs.w3.org/hg/rdf/raw-file/default/nquads/index.html">N-Quads</a> is
a simple extension to N-Triples enabling the exchange of RDF datasets. N-Quads adds a fourth
- element to each line, capturing the graph IRI of the triple described on that line. For example,
- we could write the first triple of our N-Triples example as follows.</p>
+ element to each line, capturing the graph IRI of the triple described on that line. For example
+ we could split our "Mona Lisa" example in two graphs <a href="#subsection-graphs">as we did above</a>
+ and serialize the resulting dataset in N-Quads as follows.</p>
<pre>
-<http://example.org/#bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.org/#graph-1>.
+<http://example.org/bob#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.org/bob> .
+<http://example.org/bob#me> <http://xmlns.com/foaf/0.1/knows> <http://example.org/alice#me> <http://example.org/bob> .
+<http://example.org/bob#me> <http://schema.org/birthDate> "1990-07-04"^^<http://www.w3.org/2001/XMLSchema#date> <http://example.org/bob> .
+<http://example.org/bob#me> <http://xmlns.com/foaf/0.1/topic_interest> <http://www.wikidata.org/entity/Q12418> <http://example.org/bob> .
+<http://viaf.org/viaf/24604287/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
+<http://viaf.org/viaf/24604287/> <http://xmlns.com/foaf/0.1/name> "Leonardo da Vinci" <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
+<http://viaf.org/viaf/24604287/> <http://xmlns.com/foaf/0.1/made> <http://www.wikidata.org/entity/Q12418> <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
+<http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619> <http://purl.org/dc/terms/subject> <http://www.wikidata.org/entity/Q12418> <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
</pre>
</section>
@@ -523,41 +528,47 @@
<h3>TriG</h3>
<p><a href="https://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html">TriG</a>
- is an extension to the Turtle syntax enabling the exchange of RDF datasets. For example
- the "Mona Lisa" example graph could be written as follows.</p>
+ is an extension to the Turtle syntax enabling the exchange of RDF datasets. For example we could write
+ our example in TriG as follows.</p>
<pre>
+@base <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix schema: <http://schema.org/> .
-@prefix : <http://example.org/bob#> .
+@prefix dcterms: <http://purl.org/dc/terms/> .
+@prefix wd: <http://www.wikidata.org/entity/> .
<http://example.org/bob>
{
- :bob
+ <bob#me>
a foaf:Person ;
- foaf:knows :alice ;
+ foaf:knows <alice#me> ;
schema:birthDate "1990-07-04"^^xsd:date ;
- :likes :the-mona-lisa .
- :alice
- a foaf:Person .
- }
+ foaf:topic_interest wd:Q12418 .
+ }
<https://www.wikidata.org/wiki/Special:EntityData/Q12418>
{
- :da-vinci
+ <http://viaf.org/viaf/24604287/>
a foaf:Person ;
- foaf:made :the-mona-lisa .
- :the-mona-lisa
- :on-display-in :the-louvre .
+ foaf:name "Leonardo da Vinci" ;
+ foaf:made wd:Q12418 .
+
+ <http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619>
+ dcterms:subject wd:Q12418 .
}
-
</pre>
</section>
- <p class="issue">Add an example of a dataset in JSON-LD</p>
+ <section id="subsection-jsonld-dataset">
+ <h3>JSON-LD</h3>
+
+ <p><a href="http://www.w3.org/TR/json-ld-syntax/">JSON-LD</a> also provides a way to serialize RDF datasets, through the use of the <code>@graph</code> keyword.</p>
+
+ </section>
</section>