Repetition
INF3580/4580 – Semantic Technologies – Spring 2015 Lecture 15: RDFa 18 June: Guest lecture, Lars Marius Garshol 25 May: no lecture (Whit Monday) Martin Giese 1st June is reserved for “Repetition” No fixed lecture material 11th May 2015 You, the students, say what you want to hear Let me know in time, so I’m prepared. Department of University of Drop a mail to [email protected] until 18th May Informatics Oslo
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 2 / 29
Reminder Today’s Plan Outline
1 Reminder 1 Reminder
2 Linking RDF to HTML 2 Linking RDF to HTML
3 RDFa 3 RDFa
4 Conclusion 4 Conclusion
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 3 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 4 / 29 Reminder Linking RDF to HTML RDF on the Web Outline
RDF data exists in many forms: 1 Reminder In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. 2 Linking RDF to HTML In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files 3 RDFa As data model behind SPARQL query endpoints for instance dbpedia.org, dblp, and others Embedded in HTML, as RDFa 4 Conclusion
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 6 / 29
Linking RDF to HTML Linking RDF to HTML The Problem Embedding RDF/XML in (X)HTML
First idea: Embed RDF/XML in HTML or XHTML: The HTML web contains lots of human-readable information How can clients discover the location of corresponding machine-readable information?
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 7 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29 Linking RDF to HTML Linking RDF to HTML HTML LINK elements LINKing to RDF
LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages To link to an RDF representation: Next, previous, index, etc. xml" rel – the kind of relation title="RDF/XML version" type – the media type of the related document href="http://dbpedia.org/data/Oslo.xml"> href – the URL of the other document title – the title of the other document Also: rel="meta" (and some more) Note: difference between meta-data and alternative representation E.g. a style sheet: Various web browser plugins exist to detect these LINKs
Linking RDF to HTML RDFa HTTP Link: response headers Outline
Problems with elements: Only works with HTML data, not PDF, Images, etc. 1 Reminder Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 2 Linking RDF to HTML Generated by a few servers, recognized by a few clients Same information as in LINK HTML element, but as HTTP header: 3 RDFa Link:
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 12 / 29 RDFa RDFa Once More: Embedding RDF in (X)HTML RDFa Processing
Web browsers ignore RDFa attributes Directly embedding RDF/XML in (X)HTML does not work well RDFa processors extract a single RDF graph from a document Use a different “serialization” that blends well with (X)HTML!
From the RDFa specification (http://www.w3.org/TR/rdfa-syntax/) XHTML+RDFa The aim of RDFa is to allow a single RDF graph to be carried in various types of document mark-up. Web browser RDFa processor XHTML in spec., but works with HTML and other XML RDFa adds a fixed set of attributes to (X)HTML Document type: Web page RDF graph
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 14 / 29
RDFa RDFa RDFa Concepts Reminder: (X)HTML Meta and Link
Links and metadata in HTML header: RDFa adds semantic annotations to
hyper-links (href)INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 16 / 29 RDFa RDFa RDFa property and rel Attribute rel on A elements
“semantic” meta and link in RDFa: rel="cc:license"
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 17 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 18 / 29
RDFa RDFa The property attribute Changing the Subject
rel is for resource objects, property for literal objects: about changes subject of contained rel and property annotations: xmlns:foaf="http://xmlns.com/foaf/0.1/">
...Martin Giese
Email:
Kransen
Written in 1920 [email protected] <> dc:title "Kransen" ; dc:created "1920" .typeof adds an rdf:type triple Missing objects collected from contained elements (chaining): Missing URIs can lead to blank nodes:
-
Email: href="http://www.kjetil.kjernsmo.net/">Kjetil [email protected]
Martin Giese
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 21 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 22 / 29
RDFa RDFa Triples From Chaining Example RDFa Summary
http:/...kjernsmo.net/ Allows to “hide” an RDF graph in an XHTML document XHTML processor can ignore RDFa foaf:homepage RDFa processor can extract RDF graph foaf:name Kjetil rdf:type Treat links and text as subjects/objects and literals
foaf:knows Many, many more details! Specification hardly less complicated than RDF/XML foaf.rdf#me foaf:Person See spec. at http://www.w3.org/TR/rdfa-syntax/ foaf:knows
rdf:type Nothing you couldn’t do with a LINK and an RDF file
foaf:name Can be convenient to have information in one place Martin foaf:homepage Used by Google as one data format for “Rich Snippets” https://developers.google.com/structured-data/
http:/.../martige/ NOTE: this lecture was about RDFa 1.0. Search the web for RDFa 1.1!
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 23 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29 Conclusion Conclusion Outline Topics Covered
1 Reminder RDF, principles, Turtle syntax The Jena API for RDF 2 Linking RDF to HTML The SPARQL Query Language Basics of the RDFS and OWL ontology languages 3 RDFa Basics of model semantics and reasoning Linked Open Data, RDFa
4 Conclusion Publishing Databases as RDF
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 25 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29
Conclusion Conclusion Topics Not Covered Help! I Can’t Get Enough!
Rule Languages (SWRL, RIF, Jena rules, etc.) For more information on theory: SW application structures Book on Foundations of SW Technologies Semantic Web Services Take a course in logic or automated reasoning Details of RDF/RDFS model semantics For more information on practical questions: Some details of OWL Book on Semantic Web Programming Standards texts on W3C Web pages Details of OWL 2 profiles Google Logical theory: Soundness, Completeness,. . . Still not enough? (You ain’t seen nothing yet :-) Contact us for possible MSc topics! And many more!
INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29