edit
authorGuus Schreiber <guus.schreiber@vu.nl>
Tue, 12 Nov 2013 23:54:16 +0100
changeset 1291 846d4e459976
parent 1290 44b3daa807c6
child 1292 5533100a3a88
edit
rdf-primer/index.html
--- a/rdf-primer/index.html	Tue Nov 12 23:02:48 2013 +0100
+++ b/rdf-primer/index.html	Tue Nov 12 23:54:16 2013 +0100
@@ -39,7 +39,7 @@
           // if this is a LCWD, uncomment and set the end of its review period
           // lcEnd: "2013-09-06",
 
-          // if there is an earler version of this specification at the Recommendation level,
+          // if there is an earlier version of this specification at the Recommendation level,
           // set this to the shortname of that version. This is optional and not usually
           // necessary.
           // prevRecShortname: "rdf-primer",
@@ -172,7 +172,7 @@
       [[!RDF11-CONCEPTS]])
       <li>A document describing the formal model-theoretic semantics
       of RDF ("RDF Semantics") [[!RDF11-MT]]</li>
-      <li>Specifiations of concrete syntaxes for RDF, such as Turtle
+      <li>Specifications of concrete syntaxes for RDF, such as Turtle
       [[!TURTLE]] and TriG [[!TRIG]]. </li> 
       <li>The RDF Vocabulary Description Language RDF Schema
       [[!RDF-SCHEMA]],</li>
@@ -193,29 +193,40 @@
 
     <ul>
       <li>Adding machine-readable information to web pages using for example
-      the popular <a href="http://schema.org">schema.org</a> vocabulary, enabling them to be displayed
+      the popular <a href="http://schema.org">schema.org</a>
+      vocabulary, enabling them to be displayed 
       in an enhanced format on search engines or to be processed automatically
       by third-party applications.</li>
-      <li>Enriching a dataset by linking it to third-party datasets. For example a dataset about
+      <li>Enriching a dataset by linking it to third-party
+      datasets. For example a dataset about 
       paintings could be enriched by linking them to the corresponding 
       artists in <a href="http://www.wikidata.org">Wikidata</a>,  
-      therefore giving access to a wide range of information about them and related resources.</li>
+      therefore giving access to a wide range of information about
+      them and related resources.</li> 
       <li>Interlinking API feeds, making sure that clients can easily
       discover how to access more information.</li> 
-      <li>Using the datasets currently published as Linked Data [[LINKED-DATA]], for example
+      <li>Using the datasets currently published as Linked Data
+      [[LINKED-DATA]], for example 
       building aggregations of data around specific topics.</li>
-      <li>Building distributed social networks by interlinking RDF descriptions of people
+      <li>Building distributed social networks by interlinking RDF
+      descriptions of people 
       across multiple web sites.</li>
-      <li>Providing a standard-compliant way for exchanging data between graph databases.</li>
-      <li>Interlinking various datasets within an organisation, enabling cross-dataset queries to
+      <li>Providing a standard-compliant way for exchanging data
+      between graph databases.</li> 
+      <li>Interlinking various datasets within an organisation,
+      enabling cross-dataset queries to 
       be performed using SPARQL [[SPARQL11-QUERY]].</li>
     </ul>
+    
 </section>
 
 <section id="section-data-model">
 
     <h2>RDF Data Model</h2>
 
+    <p class="issue">Suggest not to discuss generalized RDF in the
+    Primer</p>
+    
     <section id="subsection-triple">
 
     <h3>Triples</h3>
@@ -247,9 +258,11 @@
 
     <p>Resources typically occur in multiple 
     triples, for example Bob and the Mona Lisa painting in the examples above. We
-    can therefore visualise triples as a connected <strong>graph</strong>. Graphs consists
+    can therefore visualise triples as a connected
+    <strong>graph</strong>. Graphs consists 
     of nodes and arcs. The subjects and
-    objects of the triples make up the nodes in the graph; the predicates form the arcs. </p>
+    objects of the triples make up the nodes in the graph; the
+    predicates form the arcs. </p> 
 
     <figure>
       <img src="images/todo.png" width="50%"
@@ -258,7 +271,8 @@
     </figure>
 
     
-    <div class="issue">The following is just one way of representing RDF in relational terms, not sure it is needed</div>
+    <div class="issue">The following is just one way of representing
+    RDF in relational terms, not sure it is needed</div> 
 
     <div class="note">Readers familiar with databases could view the RDF
     data model as a binary database model, where every distinct
@@ -267,9 +281,8 @@
 
     
     <p>In the following sections we discuss the three basic constructs
-    that appear in RDF statements, namely IRIs, literals and blank nodes, in more detail. </p>
-
-    <div class="issue">Should the text below mention the 'generalized data model' in RDF semantics?</div>
+    that appear in RDF statements, namely IRIs, literals and blank
+    nodes, in more detail. </p> 
 
     </section>
 
@@ -279,7 +292,7 @@
 
     <p>The abbreviation IRI is short for "International Resource
     Identifier".  An IRI identifies a Web resource. IRIs are
-    generalization of URIs (Uniform Resource Indeitfiers), allowing
+    generalization of URIs (Uniform Resource Identifiers), allowing
     non-ASCII characters to be used in the IRI character string. IRIs are specified
     in RFC 3987 [[!RFC3987]]. 
 
@@ -292,10 +305,6 @@
 
       <div class="example"><a href="http://www.wikidata.org/entity/Q12418">http://www.wikidata.org/entity/Q12418</a></div>
 
-    <p>The IRI for a Web page about this painting in Wikidata is:</p>
-
-      <div class="example"><a href="http://www.wikidata.org/wiki/Q12418">http://www.wikidata.org/wiki/Q12418</a></div>
-
       <p>The IRI for Leonardo da Vinci in <a
       href="http://viaf.org">VIAF</a> (Virtual International Authority
       File) is:</p>
@@ -306,9 +315,9 @@
 
       <div class="example"><a href="http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619">http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619</a></div>
 
-    <p class="note">RDF is agnositc about what the IRI stands for. However,
+    <p class="note">RDF is agnostic about what the IRI stands for. However,
     IRIS may be given meaning by particular vocabularies or
-    conventions. VIAF (see example above) is an example of such a vocabulry. RDF
+    conventions. VIAF (see example above) is an example of such a vocabulary. RDF
     vocabularies are discussed in more detail in Sec. <a
     href="#section-vocabulary">"RDF vocabularies"</a>. </p>
     
@@ -321,11 +330,12 @@
       <p>Literals are basic values that are not IRIs. Examples of literals include
       strings such as "La Joconde", dates such as "the 4th of July, 1990"
       and numbers such as "3.14159". 
-      Litterals are associated with a <i>datatype</i> enabling such
+      Literals are associated with a <i>datatype</i> enabling such
       values to be parsed and interpreted correctly.  
       String literals can optionally be associated with a <i>language
       tag</i>. For example "Léonard de Vinci" could 
-      be associated with the "fr" language tag and "李奥纳多·达·文西" with the "zh" language tag.</p>
+      be associated with the "fr" language tag and "李奥纳多·达·文西"
+      with the "zh" language tag.</p> 
 
       <p>Literals can only appear in the object position of an RDF
       statement.</p>
@@ -336,7 +346,7 @@
      Schema, such as string, boolean, integer, decimal and date. </p>
 
      <p class="note">The 2004 version of RDF contained the notion of a
-     "plain lieral" with no datatype. This feature has been removed as the
+     "plain literal" with no datatype. This feature has been removed as the
      distinction between "plain" literals and literals with datatype
      "string" was confusing. RDF syntaxes such as Turtle allow
      writing literals without an explicit datatype, but this is
@@ -355,7 +365,8 @@
       was born in Vinci". Anonymous resources such as "X" are called "blank
       nodes" in RDF. </p>
 
-      <p>Blank nodes can appear in the subject and object position of an RDF statement. They can be used
+      <p>Blank nodes can appear in the subject and object position of
+      an RDF statement. They can be used 
       to denote resources without explicitly naming them with an
       IRI.</p>
 
@@ -406,8 +417,8 @@
         &lt;This video document&gt; &lt;is about&gt; &lt;the Mona Lisa&gt;
       </pre>
 
-      <p>We can then make statements about these two graphs, for example adding license and provenance
-      information.</p>
+      <p>We can then make statements about these two graphs, for
+      example adding license and provenance information.</p>
 
       <pre>
         &lt;http://example.com/bob&gt; &lt;is published by&gt; &lt;http://example.org&gt;.
@@ -416,8 +427,8 @@
 
       <p class="issue">We should introduce default graphs here as well.</p>
 
-      <p>These two graphs constitute an RDF <i>dataset</i>. RDF datasets are collections of 
-      RDF graphs.</p>
+      <p>These two graphs constitute an RDF <i>dataset</i>. RDF
+      datasets are collections of RDF graphs.</p>
 
     <p class="note">Multiple graphs are a recent extension of the RDF
     data model. The original data model assumed that all triples are
@@ -436,14 +447,14 @@
     <h2>RDF Vocabularies</h2>
 
     <p>The RDF data model provides a way to make statements about
-    (Web) respources. As we mentioned, this data model does not make any
+    (Web) resources. As we mentioned, this data model does not make any
     assumptions about what these resources stand for. In practice, RDF
     is typically used in combination with vocabularies or other
     conventions that provide semantic information about these
     resources.For example, if you put the VIAF IRI for Leonardo da
     Vinci (see Sec. <a href="#subsection-IRI">"IRI"</a>) in your
     browser you will see a page with information about this
-    artist. VIAF maintains, amonhst others, 15 million of such person
+    artist. VIAF maintains, amongst others, 15 million of such person
     records. @@ ref  </p>
 
     <p class="note">Your browser will display a HTML page. Content
@@ -452,13 +463,13 @@
 
     <p>To support the definition of vocabularies RDF provides an RDF
     Vocabulary Description Language called RDF-Schema
-    [[!RDF-SCHEMA]]. This allows you to define senabtuc cinstraints on
+    [[!RDF-SCHEMA]]. This allows you to define semantic constraints on
     your RDF data. For example, you can state that
     <code>ex:friendOf</code> is a predicate and that subject and
     object of this property must be resources of class
     </code>ex:Person</code>. <p>
 
-    <p>RDF Schema uses the noion of "class" to
+    <p>RDF Schema uses the notion of "class" to
     model groups of resources that can act as subject or objects. The
     term "property" is used to model predicates.  The main modelling
     constructs in RDF Schema are listed in the Table below:
@@ -492,7 +503,7 @@
     </tr>
     <tr>
       <td>subPropertyOf (a property)</td>
-      <td>subject (a property) is a subproperty of object (a property)</td>
+      <td>subject (a property) is a sub-property of object (a property)</td>
      <td>rdfs:subPropertyOf</td>
    </tr>
     <tr>
@@ -508,7 +519,7 @@
   </tbody>
 </table>
 
-<p class="note">The syntactic form (thrid column) is in a prefix
+<p class="note">The syntactic form (third column) is in a prefix
 notation wich will be 
 discussed in more detail in Sec. <a href="#section-graph-syntax">"Writing RDF
 Graphs"</a>. The fact that the constructs have two different prefixes
@@ -534,7 +545,7 @@
 
 <dl>
   <dt><a href="http://dublincore.org/documents/dcmi-terms/">Dublic Core</a></dt>
-  <dd>The Dublic Core Metadata Initative maintains a metadata element
+  <dd>The Dublic Core Metadata Initiative maintains a metadata element
   set for describing a wide range of resources. The scheme provides
   properties such as "creator", "publisher" and "title".</dd>
 
@@ -544,7 +555,7 @@
   webpages, so that search engines understand what the pages are
   about.</dd>
 
-  <div class="issue">Check with DanBri about how to forumulate
+  <div class="issue">Check with DanBri about how to formulate
   relationship between schema.org and RDF schema.</div>
   
   <dt><a href="http://wordnet.princeton.edu/">WordNet</a></dt>
@@ -564,10 +575,10 @@
   vocabulary</a>.</dd> 
 </dl>
 
-<p>RDF Schema provides basic facilities for modelling semantics of RDF
+<p>RDF Schema provides basic facilities for modeling semantics of RDF
 data. For a specification of these semantics the reader is referred to
 the RDF Semantics document [[RDF11-MT]]. For more comprehensive
-semantic modelling of RDF data W3C recommends the use the Web Ontology
+semantic modeling of RDF data W3C recommends the use the Web Ontology
 Language OWL [[OWL2-OVERVIEW]]. </p>
 
 </section>
@@ -580,7 +591,7 @@
     subsections we show RDF syntax examples using the Turtle and Trig
     language, because these two languages are best suited for human
     consumption. The final subsection lists the other RDF syntaxes,
-    which include RDFa (for HTML embedding), JSON-LD,
+    which include RDFa (for HTML embedding), JSON-LD (JSON-based syntax),
     N-Triples/N-Quads (line-based exchange formats) and RDF/XML. In
     Appendix <a href="#section-other-syntaxes">"RDF syntax
     examples"</a> the reader can find for each RDF syntax
@@ -592,12 +603,12 @@
       <h3>Turtle</h3>
 
       <p>Turtle [[TURTLE]] provides a syntax for RDF
-      graphs, which is convenient for humans. Turtle It introduces numerous 
-      syntax shortcuts, such as
+      graphs, which is relatively convenient for humans. Turtle It
+      introduces numerous syntax shortcuts, such as
       support for namespaces, lists and shorthands for datatyped 
-      literals. Turtle provides a good trade-off between ease of
-      writing, ease of parsing and readability. Our single-graph example can be
-      represented in Turtle as follows.</p>
+      literals. Turtle provides a trade-off between ease of
+      writing, ease of parsing and readability. Our first example can be
+      represented in Turtle as follows:</p>
 
       <pre class="example" id="turtle-example">
 01    @base &lt;http://example.org/&gt; .
@@ -632,15 +643,32 @@
 of a Turtle sentence. </p>
 
 <p>Lines 8-12 show how Turtle provides a shorthand for a set of
-triples wuth the same subject. Lines 9-12 specify the predicate-object
+triples with the same subject. Lines 9-12 specify the predicate-object
 part of triples with <code>http://example.org/bob#me</code> as
 subject. The semicolons at the end of lines 9-11 indicate that the
 set is not yet complete. Here is the triple represented by line 10 in its expanded form:</p> 
-<p>
+<pre>
 http://example.org/bob#me http://xmlns.com/foaf/0.1/knows http://example.org/alice#me .
 </pre>
-<p>
+<p>Line 9 is an example of a special kind of syntactic sugar. The "a" 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>). <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 "^^" delimiter. The date
+representation follows the conventions of the XML Schema datatype
+"date".</>
 
+<p>Because string literals are so ubiquitous Turtle allows the user to
+omit the datatype when writing a string literal. Thus, <code>"This is a
+string"</code> is equivalent to <code>"This is a
+string"^^xsd:string</code>. Strings can be language-tagged the tag
+appears after the string, separated by a "@" symbol, and before the
+datatype: <code>"This is an English string"@en^^xsd:string</code
+
+<p>The above is by no means a full account of the Turtle syntax. For
+more details about the syntax of Turtle the reader is referred to the
+Turtle document [[TURTLE]].</p>
 
 </section>
 
@@ -648,42 +676,43 @@
 
       <h3>TriG</h3>
 
-      <p>TriG [[TRIG]] is an extension to the Turtle syntax enabling
-      the exchange of multiple graphs in the form of RDF datasets. For
-      example we could write  
-      our multi-graph example in TriG as follows.</p>
+      <p>The syntax of Turtle supports only the specification of single
+      graphs without a means for "naming" them. TriG [[TRIG]] is an
+      extension to the Turtle syntax enabling the specification of
+      multiple graphs. The multi-graph version of our example (@@ ref)
+      can be specified in TriG as follows:</p>
 
       <pre class="example" id="trig-example">
-@base &lt;http://example.org/&gt; .
-@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
-@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .
-@prefix schema: &lt;http://schema.org/&gt; .
-@prefix dcterms: &lt;http://purl.org/dc/terms/&gt; .
-@prefix wd: &lt;http://www.wikidata.org/entity/&gt; .
-
-&lt;http://example.org/bob&gt;
-  {
-    &lt;bob#me&gt;
-      a foaf:Person ;
-      foaf:knows &lt;alice#me&gt; ;
-      schema:birthDate "1990-07-04"^^xsd:date ;
-      foaf:topic_interest wd:Q12418 .
-  }
-
-&lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt;
-  {
-    &lt;http://viaf.org/viaf/24604287/&gt;
-      a foaf:Person ;
-      foaf:name "Leonardo da Vinci" .
-
-    wd:Q12418
-      dcterms:creator &lt;http://viaf.org/viaf/24604287/&gt; .
-
-    &lt;http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619&gt;
-      dcterms:subject wd:Q12418 .
-  }
+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;
+09      {
+10        &lt;bob#me&gt;
+11            a foaf:Person ;
+12            foaf:knows &lt;alice#me&gt; ;
+13            schema:birthDate "1990-07-04"^^xsd:date ;
+14            foaf:topic_interest wd:Q12418 .
+15      }
+16    &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt;
+17      {
+18        &lt;http://viaf.org/viaf/24604287/&gt;
+19            a foaf:Person ;
+20            foaf:name "Leonardo da Vinci" .
+21    
+22        wd:Q12418
+23            dcterms:creator &lt;http://viaf.org/viaf/24604287/&gt; .
+24    
+25        &lt;http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619&gt;
+26            dcterms:subject wd:Q12418 .
+27      }
       </pre>
 
+    <p>
     </section>
 
     <section id="subsection-other-syntaxes">
@@ -708,7 +737,8 @@
 
       <dt>N-Triples</dt>
       <dd>N-Triples [[N-TRIPLES]]
-      provides a simple line-based, plain text way for serializing RDF graphs. Each line represents
+      provides a simple line-based, plain text way for serializing RDF
+      graphs. Each line represents 
       an RDF triple. Its subject, predicate and object are separated
       by white space. N-Triples is often used for RDF examples,
       exchanging large RDF datasets, and processing large RDF graphs 
@@ -716,11 +746,10 @@
 
       <dt>N-Quads</dt>
       <dd>N-Quads [[N-QUADS]] 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 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.</dd>
+      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. </dd>
 
       <dt>RDF/XML</dt>
       <dd>RDF/XML [[RDF-SYNTAX-GRAMMAR]] provides an XML syntax for RDF
@@ -764,7 +793,8 @@
 different concrete syntaxes of RDF are briefly described. Examples are
 given only of the Turtle and TriG syntax. This appendix lists
 corresponding examples for the other syntaxes listed. The
-single-graph examples encode the same information as the <a href="#turtle-example">Turtle
+single-graph examples encode the same information as the <a
+   href="#turtle-example">Turtle 
 example</a>; the mutiple-graphs examples encode the same information as the <a href="#trig-example">Trig
 example</a>. </p>