INF3580/4580 Semantic Technologies Spring 2015 Lecture 15: RDFa Martin Giese 11th May 2015 Department of Informatics University of Oslo
Repetition 18 June: Guest lecture, Lars Marius Garshol 25 May: no lecture (Whit Monday) 1st June is reserved for Repetition No fixed lecture material You, the students, say what you want to hear Let me know in time, so I m prepared. Drop a mail to martingi@ifi.uio.no until 18th May INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 2 / 29
Today s Plan 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 3 / 29
Outline Reminder 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 4 / 29
RDF on the Web Reminder RDF data exists in many forms: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files As data model behind SPARQL query endpoints INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files As data model behind SPARQL query endpoints for instance dbpedia.org, dblp, and others INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files As data model behind SPARQL query endpoints for instance dbpedia.org, dblp, and others Embedded in HTML, as RDFa INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29
Outline Linking RDF to HTML 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 6 / 29
Linking RDF to HTML The Problem 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
Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29
Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... Not recommended: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29
Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... Not recommended: Does not fit HTML or XHTML DTDs INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29
Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... Not recommended: Does not fit HTML or XHTML DTDs No satisfactory solution, due to flexible RDF vocabulary INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29
Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... Not recommended: Does not fit HTML or XHTML DTDs No satisfactory solution, due to flexible RDF vocabulary B.t.w. there is a metadata element in SVG for this! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document href the URL of the other document INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document href the URL of the other document title the title of the other document INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document href the URL of the other document title the title of the other document (and some more) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document href the URL of the other document title the title of the other document (and some more) E.g. a style sheet: <html> <head> <title>my Homepage</title> <link rel="stylesheet" type="text/css" href="style.css"> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29
LINKing to RDF Linking RDF to HTML To link to an RDF representation: <LINK rel="alternate" type="application/rdf+xml" title="rdf/xml version" href="http://dbpedia.org/data/oslo.xml"> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 10 / 29
Linking RDF to HTML LINKing to RDF To link to an RDF representation: <LINK rel="alternate" type="application/rdf+xml" title="rdf/xml version" href="http://dbpedia.org/data/oslo.xml"> Also: rel="meta" INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 10 / 29
Linking RDF to HTML LINKing to RDF To link to an RDF representation: <LINK rel="alternate" type="application/rdf+xml" title="rdf/xml version" href="http://dbpedia.org/data/oslo.xml"> Also: rel="meta" Note: difference between meta-data and alternative representation INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 10 / 29
Linking RDF to HTML LINKing to RDF To link to an RDF representation: <LINK rel="alternate" type="application/rdf+xml" title="rdf/xml version" href="http://dbpedia.org/data/oslo.xml"> Also: rel="meta" Note: difference between meta-data and alternative representation Various web browser plugins exist to detect these LINKs INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 10 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients Same information as in LINK HTML element, but as HTTP header: Link: <foaf.rdf>; rel="alternate"; type="application/rdf+xml" INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients Same information as in LINK HTML element, but as HTTP header: Link: <foaf.rdf>; rel="alternate"; type="application/rdf+xml" Advantages: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients Same information as in LINK HTML element, but as HTTP header: Link: <foaf.rdf>; rel="alternate"; type="application/rdf+xml" Advantages: can be sent also with non-html data INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients Same information as in LINK HTML element, but as HTTP header: Link: <foaf.rdf>; rel="alternate"; type="application/rdf+xml" Advantages: can be sent also with non-html data requires only HEAD request INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29
Outline RDFa 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 12 / 29
RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29
RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29
RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! From the RDFa specification (http://www.w3.org/tr/rdfa-syntax/) The aim of RDFa is to allow a single RDF graph to be carried in various types of document mark-up. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29
RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! From the RDFa specification (http://www.w3.org/tr/rdfa-syntax/) The aim of RDFa is to allow a single RDF graph to be carried in various types of document mark-up. XHTML in spec., but works with HTML and other XML INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29
RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! From the RDFa specification (http://www.w3.org/tr/rdfa-syntax/) The aim of RDFa is to allow a single RDF graph to be carried in various types of document mark-up. XHTML in spec., but works with HTML and other XML RDFa adds a fixed set of attributes to (X)HTML INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29
RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! From the RDFa specification (http://www.w3.org/tr/rdfa-syntax/) The aim of RDFa is to allow a single RDF graph to be carried in various types of document mark-up. XHTML in spec., but works with HTML and other XML RDFa adds a fixed set of attributes to (X)HTML Document type: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/markup/dtd/xhtml-rdfa-1.dtd"> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29
RDFa RDFa Processing Web browsers ignore RDFa attributes RDFa processors extract a single RDF graph from a document <html> XHTML+RDFa </html> Web browser RDFa processor Web page RDF graph INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 14 / 29
RDFa Concepts RDFa RDFa adds semantic annotations to INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29
RDFa Concepts RDFa RDFa adds semantic annotations to hyper-links (href) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29
RDFa Concepts RDFa RDFa adds semantic annotations to hyper-links (href) textual content INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29
RDFa RDFa Concepts RDFa adds semantic annotations to hyper-links (href) textual content RDFa attributes can appear in (almost) any element INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29
RDFa RDFa Concepts RDFa adds semantic annotations to hyper-links (href) textual content RDFa attributes can appear in (almost) any element As the XHTML is processed, there is always a current subject that generated triples refer to INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29
RDFa RDFa Concepts RDFa adds semantic annotations to hyper-links (href) textual content RDFa attributes can appear in (almost) any element As the XHTML is processed, there is always a current subject that generated triples refer to The current subject starts as the base URI of the document, but can change on the way INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29
RDFa Reminder: (X)HTML Meta and Link Links and metadata in HTML header: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>page 507</title> <meta name="author" content="sigrid Undset" /> <link rel="prev" href="page506.html" /> <link rel="next" href="page508.html" /> </head> <body>...</body> </html> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 16 / 29
RDFa Reminder: (X)HTML Meta and Link Links and metadata in HTML header: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>page 507</title> <meta name="author" content="sigrid Undset" /> <link rel="prev" href="page506.html" /> <link rel="next" href="page508.html" /> </head> <body>...</body> </html> Meaning of name and rel informal INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 16 / 29
RDFa Reminder: (X)HTML Meta and Link Links and metadata in HTML header: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>page 507</title> <meta name="author" content="sigrid Undset" /> <link rel="prev" href="page506.html" /> <link rel="next" href="page508.html" /> </head> <body>...</body> </html> Meaning of name and rel informal Only a few values defined by the standard INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 16 / 29
RDFa property and rel RDFa semantic meta and link in RDFa: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head> <title>mg s home page</title> <meta property="dc:creator" content="martin Giese" /> <link rel="foaf:topic" href="foaf.rdf#me" /> </head> <body>...</body> </html> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 17 / 29
RDFa RDFa property and rel semantic meta and link in RDFa: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head> <title>mg s home page</title> <meta property="dc:creator" content="martin Giese" /> <link rel="foaf:topic" href="foaf.rdf#me" /> </head> <body>...</body> </html> Extracted triples: (<> is base URI!) <> dc:creator "Martin Giese". <> foaf:topic <foaf.rdf#me>. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 17 / 29
Attribute rel on A elements RDFa Any hyper-link can be given a meaning : This document is licensed under a <a xmlns:cc="http://creativecommons.org/ns#" rel="cc:license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"> Creative Commons License </a>. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 18 / 29
RDFa Attribute rel on A elements Any hyper-link can be given a meaning : This document is licensed under a <a xmlns:cc="http://creativecommons.org/ns#" rel="cc:license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"> Creative Commons License </a>. Extracted triple: <> cc:license <http://creativecommons.org/.../3.0/>. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 18 / 29
RDFa Attribute rel on A elements Any hyper-link can be given a meaning : This document is licensed under a <a xmlns:cc="http://creativecommons.org/ns#" rel="cc:license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"> Creative Commons License </a>. Extracted triple: <> cc:license <http://creativecommons.org/.../3.0/>. Can use rev instead of rel to swap subject and object INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 18 / 29
The property attribute RDFa rel is for resource objects, property for literal objects: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head>...</head> <body> <h1 property="dc:title">kransen</h1> Written in <span property="dc:created">1920</span> </body> </html> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 19 / 29
The property attribute RDFa rel is for resource objects, property for literal objects: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head>...</head> <body> <h1 property="dc:title">kransen</h1> Written in <span property="dc:created">1920</span> </body> </html> Extracted triples: <> dc:title "Kransen" ; dc:created "1920". INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 19 / 29
The property attribute RDFa rel is for resource objects, property for literal objects: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head>...</head> <body> <h1 property="dc:title">kransen</h1> Written in <span property="dc:created">1920</span> </body> </html> Extracted triples: <> dc:title "Kransen" ; dc:created "1920". Can also use content attribute together with property: <span property="dc:created" datatype="xsd:datetime" content="2007-09-16t16:00:00-05:00"> September 16th at 4pm </span> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 19 / 29
Changing the Subject RDFa about changes subject of contained rel and property annotations: <div about="http://.../foaf.rdf#me" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name">martin Giese</p> <p> Email: <a rel="foaf:mbox" href="mailto:mg@mail.no"> mg@mail.no</a></p> <p> Phone: <a rel="foaf:phone" href="tel:+47-31415926"> 31 41 59 26</a></p> </div> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 20 / 29
Changing the Subject RDFa about changes subject of contained rel and property annotations: <div about="http://.../foaf.rdf#me" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name">martin Giese</p> <p> Email: <a rel="foaf:mbox" href="mailto:mg@mail.no"> mg@mail.no</a></p> <p> Phone: <a rel="foaf:phone" href="tel:+47-31415926"> 31 41 59 26</a></p> </div> Extracted triples: <http://.../foaf.rdf#me> foaf:name "Martin Giese" ; foaf:mbox <mailto:mg@mail.no> ; foaf:phone <tel:+47-31415926>. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 20 / 29
Types and Blank Nodes RDFa typeof adds an rdf:type triple INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 21 / 29
RDFa Types and Blank Nodes typeof adds an rdf:type triple Missing URIs can lead to blank nodes: <div typeof="foaf:person" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name">martin Giese</p> <p> Email: <a rel="foaf:mbox" href="mailto:mg@mail.no"> mg@mail.no</a></p> </div> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 21 / 29
RDFa Types and Blank Nodes typeof adds an rdf:type triple Missing URIs can lead to blank nodes: <div typeof="foaf:person" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name">martin Giese</p> <p> Email: <a rel="foaf:mbox" href="mailto:mg@mail.no"> mg@mail.no</a></p> </div> Extracted triples: [] a foaf:person ; foaf:name "Martin Giese" ; foaf:mbox <mailto:mg@mail.no> ; INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 21 / 29
Know Your Friends RDFa Missing objects collected from contained elements (chaining): <div xmlns:foaf="http://xmlns.com/foaf/0.1/" about="foaf.rdf#me" rel="foaf:knows"> <ul> <li typeof="foaf:person"> <a property="foaf:name" rel="foaf:homepage" href="http://www.kjetil.kjernsmo.net/">kjetil</a> </li> <li typeof="foaf:person"> <a property="foaf:name" rel="foaf:homepage" href="http://heim.ifi.uio.no/martige/">martin</a> </li> </ul> </div> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 22 / 29
RDFa Triples From Chaining Example http:/...kjernsmo.net/ foaf:homepage foaf:knows foaf:name rdf:type Kjetil foaf.rdf#me foaf:knows rdf:type foaf:person foaf:name foaf:homepage Martin http:/.../martige/ INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 23 / 29
RDFa Summary RDFa Allows to hide an RDF graph in an XHTML document INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa Summary RDFa Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa Summary RDFa Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ Nothing you couldn t do with a LINK and an RDF file INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ Nothing you couldn t do with a LINK and an RDF file Can be convenient to have information in one place INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ Nothing you couldn t do with a LINK and an RDF file Can be convenient to have information in one place Used by Google as one data format for Rich Snippets https://developers.google.com/structured-data/ INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ Nothing you couldn t do with a LINK and an RDF file Can be convenient to have information in one place Used by Google as one data format for Rich Snippets https://developers.google.com/structured-data/ NOTE: this lecture was about RDFa 1.0. Search the web for RDFa 1.1! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29
Outline Conclusion 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 25 / 29
Topics Covered Conclusion RDF, principles, Turtle syntax INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29
Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29
Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29
Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language Basics of the RDFS and OWL ontology languages INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29
Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language Basics of the RDFS and OWL ontology languages Basics of model semantics and reasoning INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29
Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language Basics of the RDFS and OWL ontology languages Basics of model semantics and reasoning Linked Open Data, RDFa INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29
Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language Basics of the RDFS and OWL ontology languages Basics of model semantics and reasoning Linked Open Data, RDFa Publishing Databases as RDF INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29
Topics Not Covered Conclusion Rule Languages (SWRL, RIF, Jena rules, etc.) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29
Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29
Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29
Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29
Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29
Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL Details of OWL 2 profiles INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29
Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL Details of OWL 2 profiles Logical theory: Soundness, Completeness,... INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29
Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL Details of OWL 2 profiles Logical theory: Soundness, Completeness,... (You ain t seen nothing yet :-) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29
Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL Details of OWL 2 profiles Logical theory: Soundness, Completeness,... (You ain t seen nothing yet :-) And many more! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29
Help! I Can t Get Enough! Conclusion For more information on theory: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29
Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29
Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29
Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29
Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29
Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming Standards texts on W3C Web pages INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29
Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming Standards texts on W3C Web pages Google INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29
Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming Standards texts on W3C Web pages Google Still not enough? INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29
Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming Standards texts on W3C Web pages Google Still not enough? Contact us for possible MSc topics! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29