Download - Introduction to RDFa
![Page 1: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/1.jpg)
Introduction to RDFa2011 Semantic Technologies Conference
7th of June, 2011,San Francisco, CA, USA
Ivan Herman, W3C
![Page 2: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/2.jpg)
(2)
For RDF people, it sounds very simple: RDFa is a serialization of RDF embedded in XHTML,
HTML, or XML in general
What is RDFa?
![Page 3: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/3.jpg)
(3)
So why bother? Why should we care? Why is that of any importance?
![Page 4: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/4.jpg)
(4)
RDFa evolves into huge source of RDF triples on the Web
![Page 5: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/5.jpg)
(5)
Apart from relational databases, most of the data on the Web are in… (X)HTML content
New content is generated every day How would one get structured data from that
information?
Data for a Web of Data
![Page 6: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/6.jpg)
(6)
Do not like to generate RDF/XML files separately RDF/XML is complex it requires a separate storage, generation, etc.
mechanism• that is also valid for, e.g., Turtle• even when authoring with, say, Emacs, creating an
extra file is a load
Authors of the “traditional Web”…
![Page 7: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/7.jpg)
(7)
Add extra structured content to the (X)HTML pages
Let processors extract those and turn into RDF
Solution
![Page 8: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/8.jpg)
(8)
Microformats reuses HTML attributes like @class, @title separate vocabularies (address, CV, …) difficult to mix microformats (no concept of
namespaces) does not, inherently, define an RDF representation• possible to transform via, e.g., XSLT + GRDDL, but all
transformations are vocabulary dependent
Existing approaches
![Page 9: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/9.jpg)
(9)
Microdata adds new attributes to HTML5 to express metadata can use URI-s, it also fixes some vocabulary
mappings (e.g., to Dublin Core elements) works well for simpler “single-vocabulary” cases,
but… …not well suited for mixing vocabularies or for
complex vocabularies has no notion of datatypes, namespaces does defines a generic mapping to RDF
Existing approaches
![Page 10: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/10.jpg)
(10)
RDFa adds new (X)HTML/XML attributes has namespaces and URI-s at its core; i.e., mixing
vocabulary is just as easy as in RDF complete flexibility for using Literals or URI
Resources is a complete serialization of RDF
Existing approaches
![Page 11: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/11.jpg)
(11)
RDFa is a bridge between the Web of Documents and the Web of Data
![Page 12: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/12.jpg)
(12)
It is very important for RDF experts and tool providers to know RDFa parse it alongside Turtle, RDF/XML or other when appropriate, generate RDFa pages
Therefore…
![Page 13: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/13.jpg)
(13)
What does RDFa look like ?
![Page 14: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/14.jpg)
(14)
RDFa means “RDF in attributes”: all RDF contents are defined through XML attributes
(no elements) the XML/HTML tree structure is used (when
appropriate) many of the attributes are defined by RDFa• some attributes (@href, @rel) are also reused
if possible, the text content is also reused
Main principles of RDFa
![Page 15: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/15.jpg)
(15)
The same (X)HTML file: is used, unchanged, by browsers• they ignore attributes they do not know how to present
can be used by specialized processors (or APIs) to extract RDF triples
What does this mean in practice?
![Page 16: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/16.jpg)
(16)
The current Recommendation is RDFa 1.0 There is an RDFa 1.1 in the making, almost
ready I will talk about RDFa 1.1 and warn when the
feature is not available in RDFa1.0
Before getting into details…
![Page 17: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/17.jpg)
(17)
XML, XHTML, HTML (or other)?
Formally: RDFa WG defines Core and XHTML HTML WG defines HTML5 other groups may define others (like Atom)
this tutorial uses XHTML examples
XHTML HTML5XML SVGAtom …
RDFa Core 1.1
![Page 18: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/18.jpg)
(18)
How does it work?
![Page 19: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/19.jpg)
(19)
![Page 20: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/20.jpg)
(20)
The source and generated RDF…<p about="http://www.w3.org/ns/entailment/RDFS" property="http://purl.org/dc/terms/description"> Unique identifier for <em>RDFS Entailment</em>.</p>
![Page 21: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/21.jpg)
(21)
The source and generated RDF…<p about="http://www.w3.org/ns/entailment/RDFS" property="http://purl.org/dc/terms/description"> Unique identifier for <em>RDFS Entailment</em>.</p>
<http://www.w3.org/ns/entailment/RDFS> … .
![Page 22: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/22.jpg)
(22)
The source and generated RDF…<p about="http://www.w3.org/ns/entailment/RDFS" property="http://purl.org/dc/terms/description"> Unique identifier for <em>RDFS Entailment</em>.</p>
<http://www.w3.org/ns/entailment/RDFS> <http://purl.org/dc/terms/description> … .
![Page 23: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/23.jpg)
(23)
The source and generated RDF…<p about="http://www.w3.org/ns/entailment/RDFS" property="http://purl.org/dc/terms/description"> Unique identifier for <em>RDFS Entailment</em>.</p>
<http://www.w3.org/ns/entailment/RDFS> <http://purl.org/dc/terms/description> "Unique identifier for RDFS Entailment." .
![Page 24: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/24.jpg)
(24)
![Page 25: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/25.jpg)
(25)
The source and generated RDF…<a about="http://www.w3.org/ns/entailment/RDFS" rel="http://www.w3.org/2000/01/rdf-schema#seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210/"> RDF Semantics.</a>
![Page 26: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/26.jpg)
(26)
The source and generated RDF…<a about="http://www.w3.org/ns/entailment/RDFS" rel="http://www.w3.org/2000/01/rdf-schema#seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210/"> RDF Semantics.</a>
<http://www.w3.org/ns/entailment/RDFS> ….
![Page 27: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/27.jpg)
(27)
The source and generated RDF…<a about="http://www.w3.org/ns/entailment/RDFS" rel="http://www.w3.org/2000/01/rdf-schema#seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210/"> RDF Semantics.</a>
<http://www.w3.org/ns/entailment/RDFS> <http://www.w3.org/2000/01/rdf-schema#seeAlso> … .
![Page 28: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/28.jpg)
(28)
The source and generated RDF…<a about="http://www.w3.org/ns/entailment/RDFS" rel="http://www.w3.org/2000/01/rdf-schema#seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210/"> RDF Semantics.</a>
<http://www.w3.org/ns/entailment/RDFS> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/TR/2004/REC-rdf-mt-20040210/> .
![Page 29: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/29.jpg)
(29)
Is that it?
![Page 30: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/30.jpg)
(30)
The combination of @about with @rel/@property and possibly @href covers most of we need…
But this is too complex for authors
What we have is… NTriples in HTML
![Page 31: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/31.jpg)
(31)
Just compare<http://www.w3.org/ns/entailment/RDFS> <http://purl.org/dc/terms/description> "Unique identifier for RDFS Entailment." .<http://www.w3.org/ns/entailment/RDFS> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/TR/2004/REC-rdf-mt-20040210/> .
with@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .@prefix dcterms: <http://purl.org/dc/terms/> .
<http://www.w3.org/ns/entailment/RDFS> rdfs:seeAlso <http://www.w3.org/TR/2004/REC-rdf-mt-20040210/> ; dcterms:description "Unique identifier for RDFS Entailment." .
![Page 32: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/32.jpg)
(32)
Use compact URI-s when possible Make use of the natural structure for
shared subjects shared predicates create blank nodes …
The “Turtle” aspects of RDFa
![Page 33: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/33.jpg)
(33)
Just like in Turtle: define a prefix via @prefix use prefix:reference to abbreviate a URI
Compact URIs (“CURIE”s)
![Page 34: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/34.jpg)
(34)
CURIE definition and usage<html> … <p about="http://www.w3.org/ns/entailment/RDFS" property="http://purl.org/dc/terms/description"> Unique identifier for <em>RDFS Entailment</em>.</p> …</html>
can be replaced by:<html prefix="dcterms: http://purl.org/dc/terms/"> … <p about="http://www.w3.org/ns/entailment/RDFS" property="dcterms:description"> Unique identifier for <em>RDFS Entailment</em>.</p> …</html>
![Page 35: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/35.jpg)
(35)
Can be anywhere in the tree and is valid for the whole sub-tree i.e., the html element is not the only place to have it
The same @prefix attribute can hold several definitions: prefix="dcterm: http://purl.org… foaf: http://…"
Some details on @prefix
![Page 36: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/36.jpg)
(36)
An alternative (deprecated) syntax is xmlns:dcterms="http://purl.org/dc/terms/"
CURIEs and “real” URIs can usually be mixed if an attribute value can be interpreted as a CURIE,
fine alternatively, it is considered as a URI
CURIEs cannot be used on @href
Some details on @prefix
![Page 37: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/37.jpg)
(37)
In RDFa 1.0 only the xmlns:XXX syntax is usable CURIEs on @about can only be used with the extra
syntax: about="[pref:ref]" Only CURIEs can be used on, e.g., @property or @rel
(no fallback on URIs)
RDFa 1.0 Warnings on CURIEs
![Page 38: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/38.jpg)
(38)
The basic principle: @about is inherited by children nodes i.e., no reason to repeat it
Sharing subjects
![Page 39: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/39.jpg)
(39)
Shared subject example
<html prefix="dcterms: http://purl.org/dc/terms/ rdfs: http://www.w3.org/2000/01/rdf-schema#"> … <body about="http://www.w3.org/ns/entailment/RDFS"> … <p property="dcterms:description"> Unique identifier for <em>RDFS Entailment</em>.</p> <p>…<a rel="rdfs:seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210"> RDFS Semantics</a>…</p>
![Page 40: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/40.jpg)
(40)
… yielding
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .@prefix dcterms: <http://purl.org/dc/terms/> .
<http://www.w3.org/ns/entailment/RDFS> rdfs:seeAlso <http://www.w3.org/TR/2004/REC-rdf-mt-20040210/> ; dcterms:description "Unique identifier for RDFS Entailment." .
![Page 41: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/41.jpg)
(41)
Intricacies of literals
![Page 42: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/42.jpg)
(42)
Date examples<body about=".." prefix="dcterms: http://…" <address> <p property="dcterms:date">2010-07-05</p> </address></body>
This leads to:
@prefix dcterms: <http://…> .<..> dcterm:date "2010-07-05" .
![Page 43: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/43.jpg)
(43)
Datatypes<body about=".." prefix="dcterms: http://… xsd: http://…" <address> <p property="dcterms:date" datatype="xsd:date">2010-07-05</p> </address></body>
This leads to:
@prefix dcterms: <http://…> .@prefix xsd: <http://…> .<..> dcterms:date "2010-07-05"^^xsd:date .
![Page 44: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/44.jpg)
(44)
The basic rule says: the (RDF) Literal is the enclosed text from the HTML content
This is fine in 80% of the cases, but… …it may not be natural in all cases! E.g.,
2010-07-05 is the “official” ISO format (for xsd:date) but “July 5, 2010” looks much more natural for a
human…
Controlling the literal content
![Page 45: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/45.jpg)
(45)
Usage of @content<body about=".." prefix="dcterms: http://… xsd: http://…" <address> <p property="dcterms:date" datatype="xsd:date" content="2010-07-05">July 5, 2010</p> </address></body>
Also leads to:@prefix dcterms: <http://…> .@prefix xsd: <http://…> .<..> dcterms:date "2010-07-05"^^xsd:date .
![Page 46: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/46.jpg)
(46)
Subjects, and objects, and subjects again…
![Page 47: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/47.jpg)
(47)
What we said is: @about sets the subject @href sets the object
But that is not always good enough we do not always want active links (i.e., the "a"
element) what about other links in HTML?
The rules until now
![Page 48: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/48.jpg)
(48)
We may not always want links…
<span about="http://www.ivan-herman.net/foaf#me"> <span rel="rdfs:seeAlso" resource="http://www.w3.org/People/Ivan/">Activity Lead</span></span>
The RDFa @resource attribute is equivalent to @href it sets the object, just like @href but it is ignored by a browser, i.e., not a link! e.g.,:
![Page 49: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/49.jpg)
(49)
“Chaining”
<http://www.w3.org/ns/entailment/RDFS> dcterms:creator <http://www.ivan-herman.net/foaf#me> .
<http://www.ivan-herman.net/foaf#me> foaf:mailbox <mailto:[email protected]> ; foaf:workplaceHomepage <http://www.w3.org> .
Here is what we would like to have in RDFa
![Page 50: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/50.jpg)
(50)
“Chaining”
<body about="http://www.w3.org/ns/entailment/RDFS"> … <address> <span rel="dcterms:creator" resource="http://www.ivan-herman.net/foaf#me"/> <span about="http://www.ivan-herman.net/foaf#me"> <a rel="foaf:mailbox" href="mailto:[email protected]">[email protected]</a>, <a rel="foaf:workplaceHomepage" href="http://www.w3.org">W3C</a> </span> </address>
A straightforward way:
![Page 51: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/51.jpg)
(51)
“Chaining”
<body about="http://www.w3.org/ns/entailment/RDFS"> … <address> <span rel="dcterms:creator" resource="http://www.ivan-herman.net/foaf#me"/> <span about="http://www.ivan-herman.net/foaf#me"> <a rel="foaf:mailbox" href="mailto:[email protected]">[email protected]</a>, <a rel="foaf:workplaceHomepage" href="http://www.w3.org">W3C</a> </span> </address>
A straightforward way:
![Page 52: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/52.jpg)
(52)
“Chaining”: when objects become subjects…
<body about="http://www.w3.org/ns/entailment/RDFS"> … <address> <span rel="dcterms:creator" resource="http://www.ivan-herman.net/foaf#me"> <a rel="foaf:mailbox" href="mailto:[email protected]">[email protected]</a>, <a rel="foaf:workplaceHomepage" href="http://www.w3.org">W3C</a> </span> </address>
An alternative:
![Page 53: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/53.jpg)
(53)
@resource (or @href) becomes a subject for the sub-tree
This feature is a bit like in RDF/XML
Chaining means
![Page 54: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/54.jpg)
(54)
Some extra features
![Page 55: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/55.jpg)
(55)
Blank nodes can be created using “_:XX” Shorthand for RDF types Helping single-vocabulary cases Profiles
Some extra features
![Page 56: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/56.jpg)
(56)
Typing can of course be done using @rel="rdf:type"
But that is a widely used combination, so there is a separate @typeof attribute for that
Typing
![Page 57: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/57.jpg)
(57)
Typing example<span about="http://www.ivan-herman.net/foaf#me" typeof="foaf:Person"> <span property="foaf:name">Ivan Herman</span></span>,
yields
<http://www.ivan-herman.net/foaf#me> a foaf:Person ; foaf:name "Ivan Herman" .
![Page 58: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/58.jpg)
(58)
In many cases the content is dominated by one vocabulary (e.g., dcterms, foaf, etc.)
Also: usage of CURIEs and URI-s is intuitive for RDF people…
… but not for average HTML authors!
Single-vocabulary case
![Page 59: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/59.jpg)
(59)
Solution: define a vocabulary URI for a sub-tree for that sub-tree, simple terms in @rel, @property,
etc., are automatically expanded into a full URI using the vocabulary
RDFa 1.0 warning: this is an RDFa1.1 feature!
Usage of vocab and terms
![Page 60: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/60.jpg)
(60)
@vocab and terms: this…<div prefix="foaf: http://xmlns.com/foaf/0.1/"> … <address about="http://www.ivan-herman.net/foaf#me" typeof="foaf:Person”> <span property="foaf:name">Ivan Herman</span>, <a rel="foaf:mailbox" href="mailto:[email protected]">[email protected]</a>, <a rel="foaf:workplaceHomepage" href="http://www.w3.org">W3C</a></address>
![Page 61: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/61.jpg)
(61)
…becomes<div vocab="http://xmlns.com/foaf/0.1/"> … <address about="http://www.ivan-herman.net/foaf#me" typeof="Person"> <span property="name">Ivan Herman</span>, <a rel="mailbox" href="mailto:[email protected]">[email protected]</a>, <a rel="workplaceHomepage" href="http://www.w3.org">W3C</a></address>
![Page 62: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/62.jpg)
(62)
…becomes<div vocab="http://xmlns.com/foaf/0.1/"> … <address about="http://www.ivan-herman.net/foaf#me" typeof="Person"> <span property="name">Ivan Herman</span>, <a rel="mailbox" href="mailto:[email protected]">[email protected]</a>, <a rel="workplaceHomepage" href="http://www.w3.org">W3C</a></address>
![Page 63: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/63.jpg)
(63)
…becomes<div vocab="http://xmlns.com/foaf/0.1/"> … <address about="http://www.ivan-herman.net/foaf#me" typeof="Person"> <span property="name">Ivan Herman</span>, <a rel="mailbox" href="mailto:[email protected]">[email protected]</a>, <a rel="workplaceHomepage" href="http://www.w3.org">W3C</a></address>
![Page 64: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/64.jpg)
(64)
Prefix and term declarations can be collected in a separate file and referred to via a @profile attribute the “profile file” RDFa 1.0 warning: this is an RDFa1.1 feature!
Profile files
![Page 65: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/65.jpg)
(65)
Profile Example Say, file “http://ex.org/prof” defines
prefix mappings:"foaf" → "http://xmlns.com/foaf/0.1/""rdfs" → "http://www.w3.org/2000/01/rdf-schema#"…
term mapping:"desc" → "http://purl.org/dc/terms/description"…
![Page 66: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/66.jpg)
(66)
Profile usage example: this…<html prefix="dcterms: http://purl.org/dc/terms/ rdfs: http://www.w3.org/2000/01/rdf-schema#"> … <body about="http://www.w3.org/ns/entailment/RDFS"> … <p property="dcterms:description"> Unique identifier for <em>RDFS Entailment</em>.</p> <p>…<a rel="rdfs:seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210"> RDFS Semantics</a>…</p> … <address about="http://www.ivan-herman.net/foaf#me"> <span property="foaf:name">Ivan Herman</span>, …
![Page 67: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/67.jpg)
(67)
…becomes
<html profile="http://ex.org/prof"> … <body about="http://www.w3.org/ns/entailment/RDFS"> … <p property="desc"> Unique identifier for <em>RDFS Entailment</em>.</p> <p>…<a rel="rdfs:seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210"> RDFS Semantics</a>…</p> … <address about="http://www.ivan-herman.net/foaf#me"> <span property="foaf:name">Ivan Herman</span>, …
![Page 68: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/68.jpg)
(68)
…becomes
<html profile="http://ex.org/prof"> … <body about="http://www.w3.org/ns/entailment/RDFS"> … <p property="desc"> Unique identifier for <em>RDFS Entailment</em>.</p> <p>…<a rel="rdfs:seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210"> RDFS Semantics</a>…</p> … <address about="http://www.ivan-herman.net/foaf#me"> <span property="foaf:name">Ivan Herman</span>, …
![Page 69: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/69.jpg)
(69)
Even usage of profiles might be “too much” for many HTML authors authors will forget to add the @profile declaration
RDFa defines default profiles: RDFa clients include these profiles automatically
Default profiles
![Page 70: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/70.jpg)
(70)
Default for RDFa in general http://www.w3.org/profile/rdfa-1.1 includes some widely used prefixes (rdf, rdfs, vcard, og, foaf,
dc, or dcterms are typical candidates) the profile is to be updated regularly by adding new prefixes
Default for (X)HTML http://www.w3.org/profile/html-rdfa-1.1 includes the HTML4 @rel values (next, up, license, …) the profile is to be updated regularly by adding @rel values as
they evolve in the HTML world Beware: the exact content of these, and the policy on
how to add new prefixes and terms is not yet decided!
Default profiles
![Page 71: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/71.jpg)
(71)
So this…
<html profile="http://ex.org/prof"> … <body about="http://www.w3.org/ns/entailment/RDFS"> … <p property="dcterms:description"> Unique identifier for <em>RDFS Entailment</em>.</p> <p>…<a rel="rdfs:seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210"> RDFS Semantics</a>…</p>
![Page 72: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/72.jpg)
(72)
…becomes:
<html> … <body about="http://www.w3.org/ns/entailment/RDFS"> … <p property="dcterms:description"> Unique identifier for <em>RDFS Entailment</em>.</p> <p>…<a rel="rdfs:seeAlso" href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210"> RDFS Semantics</a>…</p>
![Page 73: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/73.jpg)
(73)
Publishing and consuming RDFa
![Page 74: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/74.jpg)
(74)
Some authoring tools already have RDFa facilities: e.g., it is possible to add the right DTD to
Dreamweaver, Amaya has it at its core, etc. There are plugins to, e.g., WordPress, to
generate RDFa markup CMS systems (like Drupal 7) may have RDFa
built in their publication system users generate RDFa whether they know about it or
not…
Authoring RDFa
![Page 75: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/75.jpg)
(75)
Various search engines begin to consume RDFa Google, Yahoo, …• they may specify which vocabularies they “understand”• this is still an evolving area
There are libraries, distillers, etc., to extract RDFa information may be part of RDF development environments like
Redland, RDFLib see, for further references,
http://rdfa.info/wiki/Consume Facebook’s “social graph” is based on RDFa
Consuming RDFa
![Page 76: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/76.jpg)
(76)
RDFa+HTML file can just be on a server the client extracts the RDF content
Content negotiations can be set up on the server side the client gets the format he/she asks for the RDF content can either be generated on the fly
or stored on the server statically
Publishing RDFa
![Page 77: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/77.jpg)
(77)
Some deployment examples
![Page 78: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/78.jpg)
(78)
Embedded metadata (microdata or RDFa) is used to improve search result page at the moment only a few vocabularies are
recognized, but that will evolve over the years
Google’s rich snippets
![Page 79: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/79.jpg)
(79)
A number of popular sites publish RDFa as part of their normal pages: Tesco, BestBuy, Slideshare, The London Gazette,
Newsweek, MSNBC, O’Reilly Catalog, the White House…
Creative Commons snippets are in RDFa (e.g., on Flickr)
Effects of, e.g., Google of Facebook
![Page 80: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/80.jpg)
(80) Courtesy of Jay Myers, BestBuy, SemTech2010 Presentation
BestBuy Example for RDFa Usage
![Page 81: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/81.jpg)
(81)
BestBuy Example for RDFa Usage
Courtesy of Jay Myers, BestBuy, SemTech2010 Presentation
![Page 82: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/82.jpg)
(82)
Reported in a BestBuy blog: GoodRelations+RDFa improved Google rank
tremendously 30% increase in traffic on BestBuy store pages Yahoo observers a 15% increase in click-through rate not bad…
Today, BestBuy uses RDFa for much more than just snippets eg, to locate shops that have certain products on
stock…
Effects on BestBuy
![Page 83: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/83.jpg)
(83)
LOC example
![Page 84: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/84.jpg)
(84)
LOC example
![Page 85: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/85.jpg)
(85)
Overstock.com example
![Page 86: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/86.jpg)
(86)
Overstock.com example
![Page 87: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/87.jpg)
(87)
The huge step forward: Drupal 7
Major CMS system Has RDF at his
core, pages contain RDFa
In one step millions of pages of additional RDF data!
![Page 88: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/88.jpg)
(88)
The Examiner.com
![Page 89: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/89.jpg)
(89)
The Examiner.com
![Page 90: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/90.jpg)
(90)
Work is going on to define a Javascript API It will be possible to extract structured
information from within a Web Application Work is ongoing, let us talk about this at
SemTech next year
What I did not talk about: API
![Page 91: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/91.jpg)
(91)
RDFa is an essential bridge between the Semantic Web and the Web Developers’ communities
Is also an alternative serialization of RDF Use it!
Conclusions
![Page 92: Introduction to RDFa](https://reader036.vdocument.in/reader036/viewer/2022062410/56816195550346895dd139f2/html5/thumbnails/92.jpg)
(92)
These slides are also available on the Web:
http://www.w3.org/2011/Talks/0607-SemTech-RDFa-IH/
Thank you for your attention!