mhausenblas / lod-ng-tutorial (http://ld2sd.deri.org/lod-ng-tutorial/)
To provide a step-by-step tutorial for linked data publishing and consumption based on RDFa. We will address the following topics: (i) stepwise enrichment of a vanilla HTML page with RDFa to create a linked dataset, (ii) consumption via SPARQL, FYN, voiD, and (iii) linked data applications - from licensing to caching.
Clone this repository (size: 1.5 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/mhausenblas/lod-ng-tutorial/
| commit 21: | e3bd93da46fc |
| parent 20: | 92c503958767 |
| branch: | default |
| tags: | tip |
added some todos and fixed some minor bugs
Changed (Δ253 bytes):
raw changeset »
main.html (13 lines added, 4 lines removed)
| … | … | @@ -656,6 +656,9 @@ Let us now step back a bit and return to |
656 |
656 |
</p> |
657 |
657 |
|
658 |
658 |
<h3 id="morecompany-contact">5.1 Contact Information</h3> |
659 |
<!-- |
|
660 |
TODO change vCard modelling; actually the acme:coporation itself is a vCard:Organization ... |
|
661 |
--> |
|
659 |
662 |
<p> |
660 |
663 |
In order to express what we desire to express we introduce two new namespaces: |
661 |
664 |
</p> |
| … | … | @@ -836,7 +839,7 @@ 22: </div> |
836 |
839 |
</tbody> |
837 |
840 |
</table> |
838 |
841 |
<p> |
839 |
The resulting RDF triples from the RDFa snippet in Table 6. are show |
|
842 |
The resulting RDF triples from the RDFa snippet in Table 6. are shown in the following. We note that the object of the <code>doac:experience</code> property is a so called blank node (or bnode) as we have not minted a URI for it. The semantics of this resource does not change, though: the <em>experience</em> of the denoted <em>person</em> has <code>dbpedia:Chief_executive_officer</code> as a topic. |
|
840 |
843 |
</p> |
841 |
844 |
<pre class="turtlecode"> |
842 |
845 |
@prefix acme: <http://www.example.com/acme#> . |
| … | … | @@ -980,19 +983,22 @@ After having set up the skeleton and fil |
980 |
983 |
|
981 |
984 |
<h3 id="checklist-serving">6.3 Serving Content</h3> |
982 |
985 |
<p> |
983 |
When publishing linked data in RDFa it is essential to note that indeed one publishes for both humans and machines in one document. Both parties deserve an appropriate view on the content. Humans usually prefer HTML and the nicely rendered output in their User Agent, a Web browser, whilst machines such as Web of Data browser, data integrator or crawler prefer an RDF representation. Obviously, RDFa can deliver both from one resource. Whilst RDFa is technically just another RDF graph <a href="#ref-RDF-CONCEPTS">[RDF-CONCEPTS]</a> serialisation syntax, there may be cases (what we call 'legacy systems', from the RDFa point-of-view, in the following) that |
|
986 |
When publishing linked data in RDFa it is essential to note that indeed one publishes for both humans and machines in one document. Both parties deserve an appropriate view on the content. Humans usually prefer HTML and the nicely rendered output in their User Agent, a Web browser, whilst machines such as Web of Data browser, data integrator or crawler prefer an RDF representation. Obviously, RDFa can deliver both from one resource. Whilst RDFa is technically just another RDF graph <a href="#ref-RDF-CONCEPTS">[RDF-CONCEPTS]</a> serialisation syntax, there may be cases (what we call 'legacy systems', from the RDFa point-of-view, in the following) that accept RDF/XML as the only RDF serialisation syntax. One example of such class of systems are SPARQL engines or SPARQL endpoints. We hence should support legacy systems and serve RDF/XML, additionally, if requested via content negotiation (cf. also section 12 of the HTTP specification <a href="#ref-RFC2616">[RFC2616]</a>). This issue is relevant for both the server side and the client side: |
|
984 |
987 |
</p> |
985 |
988 |
<p> |
986 |
<strong>Server</strong>. One good practice how to serve RDF/XML from RDFa with a popular Web server is described in Ivan Herman's recipe <a href="http://ivan-herman.name/2008/02/22/setting-up-an-rdfa-with-apache/" title="Setting up an RDFa file with apache |
|
989 |
<strong>Server</strong>. One good practice how to serve RDF/XML from RDFa with a popular Web server is described in Ivan Herman's recipe <a href="http://ivan-herman.name/2008/02/22/setting-up-an-rdfa-with-apache/" title="Setting up an RDFa file with apache - Ivan's private site">Setting up an RDFa file with Apache</a>. |
|
987 |
990 |
</p> |
988 |
991 |
<p> |
989 |
<strong>Client</strong>. A valuable introduction into client-side investigations regarding content preferences can be found in the <a href="http://dowhatimean.net/2008/03/what-is-your-rdf-browsers-accept-header" title="dowhatimean.net |
|
992 |
<strong>Client</strong>. A valuable introduction into client-side investigations regarding content preferences can be found in the <a href="http://dowhatimean.net/2008/03/what-is-your-rdf-browsers-accept-header" title="dowhatimean.net - What is your RDF browser's Accept header?">What is your RDF browser's Accept header?</a> blog post by Richard Cyganiak. |
|
990 |
993 |
</p> |
991 |
994 |
|
992 |
995 |
<h3 id="checklist-triples">6.4 Resulting Triples Check</h3> |
993 |
996 |
<p> |
994 |
997 |
One thing people sometimes forget to check is if the RDF triples are correctly generated or, better say, if at least the triple they'd expect are generated. Depending on your RDFa processor of your <a href="http://www.w3.org/2006/07/SWD/RDFa/implementation-report/" title="RDFa Implementation Report">choice</a> additional triples may be generated. |
995 |
998 |
</p> |
999 |
<!-- |
|
1000 |
TODO add Operator screen shot showing additional triples from XHTML namespace |
|
1001 |
--> |
|
996 |
1002 |
<p> |
997 |
1003 |
Let us take <a href="acme.html">acme.html</a> as an example. When running this document through <a href="http://www.w3.org/2007/08/pyRdfa/" title="RDFa Distiller">RDFa Distiller</a>, an online-service converting the RDFa in other serialisations such as RDF/XML or Turtle, it <a href="http://tr.im/iI9w">yields an RDF graph</a>, which can be viewed in an Web of Data browser, such as <a href="http://www.w3.org/2005/ajar/tab" title="Tabulator: Generic data browser">Tabulator</a> (see Fig. 6). |
998 |
1004 |
</p> |
| … | … | @@ -1000,6 +1006,9 @@ Let us take <a href="acme.html">acme.htm |
1000 |
1006 |
<img src="img/acme-tabview.png" width="600px" alt="Some details about the team in RDF" /> |
1001 |
1007 |
<div><span>Fig. 6.:</span> ACME Corp.'s entire RDF graph viewed in Tabulator browser.</div> |
1002 |
1008 |
</div> |
1009 |
<!-- |
|
1010 |
TODO add ODE screen shot for a more end-user friendly checking example |
|
1011 |
--> |
|
1003 |
1012 |
<p> |
1004 |
1013 |
One should indeed go even a step further and <strong>validate</strong> the resulting RDF graph using, for example, W3C's <a href="http://www.w3.org/RDF/Validator/" title="W3C RDF Validation Service">RDF Validation Service</a> to ensure that the so generated RDF is valid. We note that this does not mean that the RDF graph makes sense, that is you <strong>can not check</strong> its <strong>semantic validity automatically</strong>, currently. The good news is that a human usually can, just by simple inspection of the RDF graph as described above, rather quickly tell if the RDF graph is shaped as expected. |
1005 |
1014 |
</p> |
