edit
authorGuus Schreiber <guus.schreiber@vu.nl>
Wed, 13 Nov 2013 01:20:10 +0100
changeset 1292 5533100a3a88
parent 1291 846d4e459976
child 1293 a56571930500
edit
rdf-primer/index.html
--- a/rdf-primer/index.html	Tue Nov 12 23:54:16 2013 +0100
+++ b/rdf-primer/index.html	Wed Nov 13 01:20:10 2013 +0100
@@ -186,10 +186,11 @@
 <section id="section-use-cases">
     <h2>Use-cases</h2>
 
-    <p>The following illustrates various different uses of RDF, aimed at different communities
-    of practice.</p>
+    <p>The following illustrates various different uses of RDF, aimed
+    at different communities of practice.</p>
 
-    <div class="issue">Should we add pointers to specific applications or use-case documents?</div>
+    <div class="issue">Should we add pointers to specific applications
+    or use-case documents?</div> 
 
     <ul>
       <li>Adding machine-readable information to web pages using for example
@@ -281,14 +282,14 @@
 
     
     <p>In the following sections we discuss the three basic constructs
-    that appear in RDF statements, namely IRIs, literals and blank
+    that appear in triples, namely IRIs, literals and blank
     nodes, in more detail. </p> 
 
     </section>
 
     <section id="subsection-IRI">
 
-      <h3>IRIs</h3>
+    <h3>IRIs</h3>
 
     <p>The abbreviation IRI is short for "International Resource
     Identifier".  An IRI identifies a Web resource. IRIs are
@@ -296,7 +297,7 @@
     non-ASCII characters to be used in the IRI character string. IRIs are specified
     in RFC 3987 [[!RFC3987]]. 
 
-    <p>IRIs can appear in all three positions of an RDF statement. </p>
+    <p>IRIs can appear in all three positions of a triple. </p>
 
     <p>IRIs can be used to identify both documents
     (e.g. a Web page) and things (e.g. a person). 
@@ -337,20 +338,22 @@
       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>
+      <p>Literals may only appear in the object position of a triple.</p>
 
      <p>The RDF Concepts document provides a
      <a href="http://www.w3.org/TR/rdf11-concepts/#section-Datatypes">list
-     of datatypes</a>.  This includes most datatypes defined by XML
+     of datatypes</a>.  This includes many datatypes defined by XML
      Schema, such as string, boolean, integer, decimal and date. </p>
 
+     <p class="issue">Suggest there is no need to mention the HTML and
+     XMLLiteral datatypes in the Primer</p> 
+
      <p class="note">The 2004 version of RDF contained the notion of a
      "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
-     syntactic sugar for a string datatype.</p>
+     writing literals without an explicit datatype and treat this
+     syntactic sugar for a string datatype.</p> 
 
     </section>
 
@@ -366,7 +369,7 @@
       nodes" in RDF. </p>
 
       <p>Blank nodes can appear in the subject and object position of
-      an RDF statement. They can be used 
+      a triple. They can be used 
       to denote resources without explicitly naming them with an
       IRI.</p>
 
@@ -409,8 +412,10 @@
       the "graph name" and the graph. See @@ for a more in-depth
       discussion on this issue. </p>
 
-      <p>A second graph could be provided by <a href="http://www.wikidata.org/">Wikidata</a>
-      and identified by <code>https://www.wikidata.org/wiki/Special:EntityData/Q12418</code>:</p>
+      <p>A second graph could be provided by <a
+      href="http://www.wikidata.org/">Wikidata</a> 
+      and identified by
+      <code>https://www.wikidata.org/wiki/Special:EntityData/Q12418</code>:</p> 
 
       <pre>
         &lt;Leonardo da Vinci&gt; &lt;is the creator of&gt; &lt;the Mona Lisa&gt;.
@@ -425,10 +430,15 @@
         &lt;http://example.com/bob&gt; &lt;has license&gt; &lt;http://creativecommons.org/licenses/by/3.0/&gt;.
       </pre>
 
-      <p class="issue">We should introduce default graphs here as well.</p>
+      <p>Multiple graphs in a RDF document constitute an <a
+      href="http://www.w3.org/TR/rdf11-concepts/#section-dataset">RDF 
+      dataset</a>. An RDF dataset may have multiple named graphs and
+      one default graph (i.e. without a name). The default graph
+      could, for example, be used to record graph metadata, such as
+      the two last statements about publisher and license information.</p>
 
-      <p>These two graphs constitute an RDF <i>dataset</i>. RDF
-      datasets are collections of RDF graphs.</p>
+      <p>In Sec. <a href="#trig-syntax">"Trig syntax"</a> an example
+    of concrete syntax for this example.</p>
 
     <p class="note">Multiple graphs are a recent extension of the RDF
     data model. The original data model assumed that all triples are
@@ -458,21 +468,25 @@
     records. @@ ref  </p>
 
     <p class="note">Your browser will display a HTML page. Content
-    negotiation allows you to get the data in other formats, such as
-    RDF. </p>
+    negotiation [[WEBARCH]] allows you to get the data in multiple
+    formats, including RDF. </p>
 
-    <p>To support the definition of vocabularies RDF provides an RDF
-    Vocabulary Description Language called RDF-Schema
-    [[!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
+    <p>To support the definition of vocabularies RDF provides a
+    vocabulary description language called RDF-Schema
+    [[!RDF-SCHEMA]]. This language allows one to define semantic constraints on
+    RDF data. For example, one can state that the IRI 
+    <code>ex:friendOf</code> can be used as a predicate and that the subject and
     object of this property must be resources of class
     </code>ex:Person</code>. <p>
 
     <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:
+    term "property" is used to model predicates.  The main modeling
+    constructs in RDF Schema are listed in the table below:
+
+    <p class="issue">The statement about classes is not completely
+    true. But otherwise the story about classes becomes very
+    complicated.</p>
 
 <table id="table-rdf-schema">
   <tbody>
@@ -540,7 +554,7 @@
 
 <p>One of first RDF Schemas used worldwide was the
 <a href="http://www.foaf-project.org/">"Friend of a Friend"</a> (FOAF)
-schema for describing social networks. Other examples of RDF
+schema for describing social networks. Other typical examples of RDF
 vocabularies are:</p>
 
 <dl>
@@ -595,7 +609,7 @@
     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
-    corresponding examples of the Turtle/TriG examples in this
+    corresponding samples for the Turtle and TriG examples in this
     section. </p>
 
     <section id="subsection-turtle">
@@ -603,11 +617,12 @@
       <h3>Turtle</h3>
 
       <p>Turtle [[TURTLE]] provides a syntax for RDF
-      graphs, which is relatively convenient for humans. Turtle It
-      introduces numerous syntax shortcuts, such as
+      graphs, which is relatively convenient for humans. Turtle
+      introduces a number of syntax shortcuts, such as
       support for namespaces, lists and shorthands for datatyped 
       literals. Turtle provides a trade-off between ease of
-      writing, ease of parsing and readability. Our first example can be
+      writing, ease of parsing and readability. Our first example (@@
+      ref) can be
       represented in Turtle as follows:</p>
 
       <pre class="example" id="turtle-example">
@@ -640,20 +655,24 @@
 is colloquially called a namespace URI, in this case of the FOAF
 vocabulary. The "base" prefix is used if no prefix is provided 
 (see <code>bob#me</code>on line 8). A period is used to signal the end
-of a Turtle sentence. </p>
+of a Turtle statement. </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>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> 
+set is not yet complete. The triple represented by line 10 looks in
+its expanded form like this:</p> 
 <pre>
 http://example.org/bob#me http://xmlns.com/foaf/0.1/knows http://example.org/alice#me .
 </pre>
+
 <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>
+constructs"</a>). The "a" 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 "^^" delimiter. The date
 representation follows the conventions of the XML Schema datatype
@@ -662,9 +681,13 @@
 <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
+string"^^xsd:string</code>. Strings can be language-tagged; the tag
+appears directly after the string, separated by a "@" symbol, and before the
+datatype. An example with language tag and datatype would be:
+
+<div class="example">
+  <code>"This is an English string"@en^^xsd:string</code
+</div>
 
 <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
@@ -679,7 +702,13 @@
       <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)
+      multiple graphs.</p>
+
+<p class="note">In RDF 1.1 any legal Turtle document is a legal TriG
+document. One could view it as one language. The names Turtle and TriG
+still exist for historical reasons.</p> 
+
+      <p>The multi-graph version of our example (@@ ref)
       can be specified in TriG as follows:</p>
 
       <pre class="example" id="trig-example">
@@ -698,21 +727,38 @@
 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      }
+16
+17    &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt;
+18      {
+19        &lt;http://viaf.org/viaf/24604287/&gt;
+20            a foaf:Person ;
+21            foaf:name "Leonardo da Vinci" .
+22    
+23        wd:Q12418
+24            dcterms:creator &lt;http://viaf.org/viaf/24604287/&gt; .
+25    
+26        &lt;http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619&gt;
+27           dcterms:subject wd:Q12418 .
+28      }
+29
+30    &lt;http://example.org/bob&gt;
+31        dcterms:publisher &lt;http://example.org&gt;
+32        dcterms:rights &lt;http://creativecommons.org/licenses/by/3.0/&gt;
       </pre>
 
-    <p>
+    <p>This RDF dataset contains two named graph. Lines 8 and 16 list
+    the names of these two graphs. The triples in the named graph are
+    placed in between matching within curly braces (lines 9 & 15, 18 &
+    28).<p>
+
+    <p>The syntax of the directives at the top and of the triples conforms to
+    the Turtle syntax.</p>
+
+    <p>The two triples specified on lines 30-32 are not part of a
+    named graph. Together they form the default graph of this RDF
+    dataset.</p> 
+
+ 
     </section>
 
     <section id="subsection-other-syntaxes">
@@ -759,7 +805,7 @@
    </dl> 
 
    </section>
-   </section>
+</section>
 
 
 <section id="section-semantics">
@@ -767,22 +813,26 @@
     <h2>Semantics of RDF Graphs</h2>
 
     <p>@@ example: derive that Alice is a person</p>
-
+    <p>@@ explain that one ITI can be a subject/object in one triple
+    and a predicate in another triple. </p>
+    <p>@@ etc </p>
 </section>
 
    <section id="section-data">
 
     <h2>RDF Data</h2>
 
-   @@ RDF sources, linked data, alignment with SPARQL
+   <p>@@ RDF sources, linked data, SPARQL</p>
    
-    <p></p>
 
 </section>
 
 
 <section id="section-roadmap">
-  <h2>Document roadmap</h2>  
+  <h2>Document roadmap</h2>
+
+   <p>@@</p>
+  
 </section>
 
 <section id="section-other-syntaxes" class="appendix">
@@ -946,6 +996,8 @@
 
       <h3>N-Quads</h3>
 
+<p>Multiple-graph example:</p>
+
       <pre class="example" id="n-quads-example">
 &lt;http://example.org/bob#me&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://xmlns.com/foaf/0.1/Person&gt; &lt;http://example.org/bob&gt; .
 &lt;http://example.org/bob#me&gt; &lt;http://xmlns.com/foaf/0.1/knows&gt; &lt;http://example.org/alice#me&gt; &lt;http://example.org/bob&gt; .