SlideShare a Scribd company logo
1 of 92
Download to read offline
2011 Semantic Technologies Conference
          7th of June, 2011,
       San Francisco, CA, USA
         Ivan Herman, W3C
}    For RDF people, it sounds very simple:
            §  RDFa is a serialization of RDF embedded in XHTML, HTML,
                or XML in general
            




(2)
(3)
(4)
}  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?




(5)
}    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




(6)
}  Add extra structured content to the (X)HTML pages
      }  Let processors extract those and turn into RDF




(7)
}    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




(8)
}    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




(9)
}    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




(10)
(11)
}    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




(12)
(13)
}    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




(14)
}    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




(15)
}  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




(16)
XML      XHTML      HTML5      Atom        SVG   …




                                 RDFa Core 1.1


       }    Formally:
             §  RDFa WG defines Core and XHTML
             §  HTML WG defines HTML5
             §  other groups may define others (like Atom)
       }    this tutorial uses XHTML examples
(17)
(18)
(19)
<p about="http://www.w3.org/ns/entailment/RDFS"
          property="http://purl.org/dc/terms/description">
            Unique identifier for <em>RDFS Entailment</em>.</p>




(20)
<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>
          … .




(21)
<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>
             … .




(22)
<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." .




(23)
(24)
<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>




(25)
<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>
         ….




(26)
<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>
               … .




(27)
<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/> .




(28)
(29)
}  The combination of @about with @rel/@property and
           possibly @href covers most of we need…
       }  But this is too complex for authors




(30)
<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." .



(31)
}  Use compact URI-s when possible
       }  Make use of the natural structure for
             §  shared subjects
             §  shared predicates
             §  create blank nodes
             §  …




(32)
}    Just like in Turtle:
             §  define a prefix via @prefix
             §  use prefix:reference to abbreviate a URI




(33)
<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>

(34)
}    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://…"




(35)
}    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




(36)
}    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) 




(37)
}    The basic principle: @about is inherited by children
             nodes
             §  i.e., no reason to repeat it




(38)
<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>




(39)
@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." .




(40)
(41)
<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" .




(42)
<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 .




(43)
}  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…




(44)
<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 .




(45)
(46)
}    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?




(47)
}    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.,:

       <span about="http://www.ivan-herman.net/foaf#me">
          <span rel="rdfs:seeAlso"
              resource="http://www.w3.org/People/Ivan/">Activity Lead</span>
       </span>




(48)
}    Here is what we would like to have in RDFa


       <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:ivan@w3.org> ;
             foaf:workplaceHomepage <http://www.w3.org> .




(49)
}    A straightforward way:
       <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:ivan@w3.org">ivan@w3.org</a>,
               <a rel="foaf:workplaceHomepage"
                   href="http://www.w3.org">W3C</a>
             </span>
         </address>




(50)
}    A straightforward way:
       <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:ivan@w3.org">ivan@w3.org</a>,
               <a rel="foaf:workplaceHomepage"
                   href="http://www.w3.org">W3C</a>
             </span>
         </address>




(51)
}    An alternative:
       <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:ivan@w3.org">ivan@w3.org</a>,
                  <a rel="foaf:workplaceHomepage"
                       href="http://www.w3.org">W3C</a>
             </span>
         </address>




(52)
}  @resource (or @href) becomes a subject for the sub-
           tree
       }  This feature is a bit like in RDF/XML




(53)
(54)
}  Blank nodes can be created using “_:XX”
       }  Shorthand for RDF types

       }  Helping single-vocabulary cases

       }  Profiles




(55)
}  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




(56)
<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" .




(57)
}  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!




(58)
}    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!




(59)
<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:ivan@w3.org">ivan@w3.org</a>,
             <a rel="foaf:workplaceHomepage"
                    href="http://www.w3.org">W3C</a>
       </address>




(60)
<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:ivan@w3.org">ivan@w3.org</a>,
             <a rel="workplaceHomepage"
                    href="http://www.w3.org">W3C</a>
       </address>




(61)
<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:ivan@w3.org">ivan@w3.org</a>,
             <a rel="workplaceHomepage"
                    href="http://www.w3.org">W3C</a>
       </address>




(62)
<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:ivan@w3.org">ivan@w3.org</a>,
             <a rel="workplaceHomepage"
                    href="http://www.w3.org">W3C</a>
       </address>




(63)
}    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!




(64)
}    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"
                – …




(65)
<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>,
             …




(66)
<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>,
              …




(67)
<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>,
              …




(68)
}    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 




(69)
}    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!

(70)
<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>




(71)
<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>




(72)
(73)
}    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…




(74)
}    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


(75)
}    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




(76)
(77)
}    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




(78)
}    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)




(79)
(80)Courtesy   of Jay Myers, BestBuy, SemTech2010 Presentation
(81)Courtesy   of Jay Myers, BestBuy, SemTech2010 Presentation
}    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…




(82)
(83)
(84)
(85)
(86)
}  Major CMS system
       }  Has RDF at his core,
           pages contain RDFa
       }  In one step millions
           of pages of
           additional RDF data!




(87)
(88)
(89)
}  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




(90)
}  RDFa is an essential bridge between the Semantic
           Web and the Web Developers’ communities
       }  Is also an alternative serialization of RDF

       }  Use it!




(91)
These slides are also available on the Web:
       
         http://www.w3.org/2011/Talks/0607-SemTech-RDFa-IH/



(92)

More Related Content

What's hot

An introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked DataAn introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked DataFabien Gandon
 
Rdf入門handout
Rdf入門handoutRdf入門handout
Rdf入門handoutSeiji Koide
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDFNarni Rajesh
 
Subject analysis, subject heading principles
Subject analysis, subject heading principlesSubject analysis, subject heading principles
Subject analysis, subject heading principlesRichard.Sapon-White
 
The Semantic Web #6 - RDF Schema
The Semantic Web #6 - RDF SchemaThe Semantic Web #6 - RDF Schema
The Semantic Web #6 - RDF SchemaMyungjin Lee
 
Google Knowledge Graph
Google Knowledge GraphGoogle Knowledge Graph
Google Knowledge Graphkarthikzinavo
 
Semantic Web - Ontologies
Semantic Web - OntologiesSemantic Web - Ontologies
Semantic Web - OntologiesSerge Linckels
 
SCONUL Seven Pillars model
SCONUL Seven Pillars modelSCONUL Seven Pillars model
SCONUL Seven Pillars modelnmjb
 
Linked Data의 RDF 어휘 이해하고 체험하기 - FOAF, SIOC, SKOS를 중심으로 -
Linked Data의 RDF 어휘 이해하고 체험하기 - FOAF, SIOC, SKOS를 중심으로 -Linked Data의 RDF 어휘 이해하고 체험하기 - FOAF, SIOC, SKOS를 중심으로 -
Linked Data의 RDF 어휘 이해하고 체험하기 - FOAF, SIOC, SKOS를 중심으로 -Dongbum Kim
 
Introduction to Ontology Concepts and Terminology
Introduction to Ontology Concepts and TerminologyIntroduction to Ontology Concepts and Terminology
Introduction to Ontology Concepts and TerminologySteven Miller
 
One Ontology, One Data Set, Multiple Shapes with SHACL
One Ontology, One Data Set, Multiple Shapes with SHACLOne Ontology, One Data Set, Multiple Shapes with SHACL
One Ontology, One Data Set, Multiple Shapes with SHACLConnected Data World
 
Latest trends in AI and information Retrieval
Latest trends in AI and information Retrieval Latest trends in AI and information Retrieval
Latest trends in AI and information Retrieval Abhay Ratnaparkhi
 

What's hot (20)

An introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked DataAn introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked Data
 
Rdf入門handout
Rdf入門handoutRdf入門handout
Rdf入門handout
 
The basics of ontologies
The basics of ontologiesThe basics of ontologies
The basics of ontologies
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDF
 
RDF Data Model
RDF Data ModelRDF Data Model
RDF Data Model
 
RDF validation tutorial
RDF validation tutorialRDF validation tutorial
RDF validation tutorial
 
Subject analysis, subject heading principles
Subject analysis, subject heading principlesSubject analysis, subject heading principles
Subject analysis, subject heading principles
 
The Semantic Web #6 - RDF Schema
The Semantic Web #6 - RDF SchemaThe Semantic Web #6 - RDF Schema
The Semantic Web #6 - RDF Schema
 
Google Knowledge Graph
Google Knowledge GraphGoogle Knowledge Graph
Google Knowledge Graph
 
Semantic Web - Ontologies
Semantic Web - OntologiesSemantic Web - Ontologies
Semantic Web - Ontologies
 
SCONUL Seven Pillars model
SCONUL Seven Pillars modelSCONUL Seven Pillars model
SCONUL Seven Pillars model
 
Linked Data의 RDF 어휘 이해하고 체험하기 - FOAF, SIOC, SKOS를 중심으로 -
Linked Data의 RDF 어휘 이해하고 체험하기 - FOAF, SIOC, SKOS를 중심으로 -Linked Data의 RDF 어휘 이해하고 체험하기 - FOAF, SIOC, SKOS를 중심으로 -
Linked Data의 RDF 어휘 이해하고 체험하기 - FOAF, SIOC, SKOS를 중심으로 -
 
ShEx by Example
ShEx by ExampleShEx by Example
ShEx by Example
 
RDF 해설서
RDF 해설서RDF 해설서
RDF 해설서
 
Introduction to Ontology Concepts and Terminology
Introduction to Ontology Concepts and TerminologyIntroduction to Ontology Concepts and Terminology
Introduction to Ontology Concepts and Terminology
 
One Ontology, One Data Set, Multiple Shapes with SHACL
One Ontology, One Data Set, Multiple Shapes with SHACLOne Ontology, One Data Set, Multiple Shapes with SHACL
One Ontology, One Data Set, Multiple Shapes with SHACL
 
Dublin core Presentation
Dublin core PresentationDublin core Presentation
Dublin core Presentation
 
Enterprise Knowledge Graph
Enterprise Knowledge GraphEnterprise Knowledge Graph
Enterprise Knowledge Graph
 
Latest trends in AI and information Retrieval
Latest trends in AI and information Retrieval Latest trends in AI and information Retrieval
Latest trends in AI and information Retrieval
 
RDA y Linked data (Ricardo Santos Muñoz)
RDA y Linked data (Ricardo Santos Muñoz)RDA y Linked data (Ricardo Santos Muñoz)
RDA y Linked data (Ricardo Santos Muñoz)
 

Viewers also liked

Linked data at globo.com - Web of Linked Entities (WoLE 2013) - WWW 2013
Linked data at globo.com - Web of Linked Entities (WoLE 2013) - WWW 2013Linked data at globo.com - Web of Linked Entities (WoLE 2013) - WWW 2013
Linked data at globo.com - Web of Linked Entities (WoLE 2013) - WWW 2013Ícaro Medeiros
 
Better Retailing through Linked Data
Better Retailing through Linked DataBetter Retailing through Linked Data
Better Retailing through Linked DataJay Myers
 
Mobile First - Palestra no MobileConf 2013
Mobile First - Palestra no MobileConf 2013Mobile First - Palestra no MobileConf 2013
Mobile First - Palestra no MobileConf 2013Horácio Soares
 
Mobile Prototyping Essentials
Mobile Prototyping EssentialsMobile Prototyping Essentials
Mobile Prototyping EssentialsRachel Hinman
 
Semantic Web and Schema.org
Semantic Web and Schema.orgSemantic Web and Schema.org
Semantic Web and Schema.orgrvguha
 
Jerry Vigil CV - Software Engineer - San Francisco, CA, USA
Jerry Vigil CV - Software Engineer - San Francisco, CA, USAJerry Vigil CV - Software Engineer - San Francisco, CA, USA
Jerry Vigil CV - Software Engineer - San Francisco, CA, USAMktNeutral
 

Viewers also liked (8)

Linked data at globo.com - Web of Linked Entities (WoLE 2013) - WWW 2013
Linked data at globo.com - Web of Linked Entities (WoLE 2013) - WWW 2013Linked data at globo.com - Web of Linked Entities (WoLE 2013) - WWW 2013
Linked data at globo.com - Web of Linked Entities (WoLE 2013) - WWW 2013
 
Better Retailing through Linked Data
Better Retailing through Linked DataBetter Retailing through Linked Data
Better Retailing through Linked Data
 
CharlesMontgomeryResume
CharlesMontgomeryResumeCharlesMontgomeryResume
CharlesMontgomeryResume
 
Alexandra Warlen Resume
Alexandra Warlen ResumeAlexandra Warlen Resume
Alexandra Warlen Resume
 
Mobile First - Palestra no MobileConf 2013
Mobile First - Palestra no MobileConf 2013Mobile First - Palestra no MobileConf 2013
Mobile First - Palestra no MobileConf 2013
 
Mobile Prototyping Essentials
Mobile Prototyping EssentialsMobile Prototyping Essentials
Mobile Prototyping Essentials
 
Semantic Web and Schema.org
Semantic Web and Schema.orgSemantic Web and Schema.org
Semantic Web and Schema.org
 
Jerry Vigil CV - Software Engineer - San Francisco, CA, USA
Jerry Vigil CV - Software Engineer - San Francisco, CA, USAJerry Vigil CV - Software Engineer - San Francisco, CA, USA
Jerry Vigil CV - Software Engineer - San Francisco, CA, USA
 

Similar to Introduction to RDFa

SemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsSemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsRinke Hoekstra
 
Chapter 3 semantic web
Chapter 3 semantic webChapter 3 semantic web
Chapter 3 semantic webR A Akerkar
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebShamod Lacoul
 
RDFa Introductory Course Session 2/4 How RDFa
RDFa Introductory Course Session 2/4 How RDFaRDFa Introductory Course Session 2/4 How RDFa
RDFa Introductory Course Session 2/4 How RDFaPlatypus
 
Semantic web
Semantic webSemantic web
Semantic webtariq1352
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2Dimitris Kontokostas
 
Understanding RDF: the Resource Description Framework in Context (1999)
Understanding RDF: the Resource Description Framework in Context  (1999)Understanding RDF: the Resource Description Framework in Context  (1999)
Understanding RDF: the Resource Description Framework in Context (1999)Dan Brickley
 
Comparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPComparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPMSGUNC
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFSNilesh Wagmare
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIsJosef Petrák
 
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...Diego Berrueta
 
Semantic Web introduction
Semantic Web introductionSemantic Web introduction
Semantic Web introductionGraphity
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Serverwebhostingguy
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQLLino Valdivia
 

Similar to Introduction to RDFa (20)

RDFa Tutorial
RDFa TutorialRDFa Tutorial
RDFa Tutorial
 
SemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsSemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n Bolts
 
Chapter 3 semantic web
Chapter 3 semantic webChapter 3 semantic web
Chapter 3 semantic web
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic Web
 
RDFa Introductory Course Session 2/4 How RDFa
RDFa Introductory Course Session 2/4 How RDFaRDFa Introductory Course Session 2/4 How RDFa
RDFa Introductory Course Session 2/4 How RDFa
 
How RDFa works
How RDFa worksHow RDFa works
How RDFa works
 
Data in RDF
Data in RDFData in RDF
Data in RDF
 
Semantic web
Semantic webSemantic web
Semantic web
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2
 
Understanding RDF: the Resource Description Framework in Context (1999)
Understanding RDF: the Resource Description Framework in Context  (1999)Understanding RDF: the Resource Description Framework in Context  (1999)
Understanding RDF: the Resource Description Framework in Context (1999)
 
SWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDFSWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDF
 
Comparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPComparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHP
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFS
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
 
XML Bible
XML BibleXML Bible
XML Bible
 
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
 
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
 
Semantic Web introduction
Semantic Web introductionSemantic Web introduction
Semantic Web introduction
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Server
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
 

More from Ivan Herman

The convergence of Publishing and the Web
The convergence of Publishing and the WebThe convergence of Publishing and the Web
The convergence of Publishing and the WebIvan Herman
 
Livres Numériques / Web : Construire la Convergence
Livres Numériques / Web : Construire la ConvergenceLivres Numériques / Web : Construire la Convergence
Livres Numériques / Web : Construire la ConvergenceIvan Herman
 
W3C Digital Publishing Interest Group Update
W3C Digital Publishing Interest Group UpdateW3C Digital Publishing Interest Group Update
W3C Digital Publishing Interest Group UpdateIvan Herman
 
Bridging the Web and Digital Publishing: EPUBWEB
Bridging the Web and Digital Publishing: EPUBWEBBridging the Web and Digital Publishing: EPUBWEB
Bridging the Web and Digital Publishing: EPUBWEBIvan Herman
 
W3C and Digital Publishing
W3C and Digital PublishingW3C and Digital Publishing
W3C and Digital PublishingIvan Herman
 
W3C et les publications numériques
W3C et les publications numériquesW3C et les publications numériques
W3C et les publications numériquesIvan Herman
 
Digital Publishing and the Open Web Platform
Digital Publishing and the Open Web PlatformDigital Publishing and the Open Web Platform
Digital Publishing and the Open Web PlatformIvan Herman
 
Standardizing for Open Data
Standardizing for Open DataStandardizing for Open Data
Standardizing for Open DataIvan Herman
 
The W3C Prov Vocabulary
The W3C Prov VocabularyThe W3C Prov Vocabulary
The W3C Prov VocabularyIvan Herman
 
Semantic Web and Related Work at W3C
Semantic Web and Related Work at W3CSemantic Web and Related Work at W3C
Semantic Web and Related Work at W3CIvan Herman
 
On scholarly communication (report of a Dagstuhl workshop)
On scholarly communication (report of a Dagstuhl workshop)On scholarly communication (report of a Dagstuhl workshop)
On scholarly communication (report of a Dagstuhl workshop)Ivan Herman
 
Introduction to Semantic Web Technologies
Introduction to Semantic Web TechnologiesIntroduction to Semantic Web Technologies
Introduction to Semantic Web TechnologiesIvan Herman
 
A year on the Semantic Web @ W3C
A year on the Semantic Web @ W3CA year on the Semantic Web @ W3C
A year on the Semantic Web @ W3CIvan Herman
 
Introduction to Semantic Web
Introduction to Semantic WebIntroduction to Semantic Web
Introduction to Semantic WebIvan Herman
 
What is New in W3C land?
What is New in W3C land?What is New in W3C land?
What is New in W3C land?Ivan Herman
 
What is the Semantic Web
What is the Semantic WebWhat is the Semantic Web
What is the Semantic WebIvan Herman
 
Some news about the SW
Some news about the SWSome news about the SW
Some news about the SWIvan Herman
 
What is the Semantic Web (in 15 minutes...)
What is the Semantic Web (in 15 minutes...)What is the Semantic Web (in 15 minutes...)
What is the Semantic Web (in 15 minutes...)Ivan Herman
 
Semantic Web Tutorial at ESTC2008, Vienna, on September 24, 2008
Semantic Web Tutorial at ESTC2008, Vienna, on September 24, 2008Semantic Web Tutorial at ESTC2008, Vienna, on September 24, 2008
Semantic Web Tutorial at ESTC2008, Vienna, on September 24, 2008Ivan Herman
 
États des lieux du Web sémantique
États des lieux du Web sémantiqueÉtats des lieux du Web sémantique
États des lieux du Web sémantiqueIvan Herman
 

More from Ivan Herman (20)

The convergence of Publishing and the Web
The convergence of Publishing and the WebThe convergence of Publishing and the Web
The convergence of Publishing and the Web
 
Livres Numériques / Web : Construire la Convergence
Livres Numériques / Web : Construire la ConvergenceLivres Numériques / Web : Construire la Convergence
Livres Numériques / Web : Construire la Convergence
 
W3C Digital Publishing Interest Group Update
W3C Digital Publishing Interest Group UpdateW3C Digital Publishing Interest Group Update
W3C Digital Publishing Interest Group Update
 
Bridging the Web and Digital Publishing: EPUBWEB
Bridging the Web and Digital Publishing: EPUBWEBBridging the Web and Digital Publishing: EPUBWEB
Bridging the Web and Digital Publishing: EPUBWEB
 
W3C and Digital Publishing
W3C and Digital PublishingW3C and Digital Publishing
W3C and Digital Publishing
 
W3C et les publications numériques
W3C et les publications numériquesW3C et les publications numériques
W3C et les publications numériques
 
Digital Publishing and the Open Web Platform
Digital Publishing and the Open Web PlatformDigital Publishing and the Open Web Platform
Digital Publishing and the Open Web Platform
 
Standardizing for Open Data
Standardizing for Open DataStandardizing for Open Data
Standardizing for Open Data
 
The W3C Prov Vocabulary
The W3C Prov VocabularyThe W3C Prov Vocabulary
The W3C Prov Vocabulary
 
Semantic Web and Related Work at W3C
Semantic Web and Related Work at W3CSemantic Web and Related Work at W3C
Semantic Web and Related Work at W3C
 
On scholarly communication (report of a Dagstuhl workshop)
On scholarly communication (report of a Dagstuhl workshop)On scholarly communication (report of a Dagstuhl workshop)
On scholarly communication (report of a Dagstuhl workshop)
 
Introduction to Semantic Web Technologies
Introduction to Semantic Web TechnologiesIntroduction to Semantic Web Technologies
Introduction to Semantic Web Technologies
 
A year on the Semantic Web @ W3C
A year on the Semantic Web @ W3CA year on the Semantic Web @ W3C
A year on the Semantic Web @ W3C
 
Introduction to Semantic Web
Introduction to Semantic WebIntroduction to Semantic Web
Introduction to Semantic Web
 
What is New in W3C land?
What is New in W3C land?What is New in W3C land?
What is New in W3C land?
 
What is the Semantic Web
What is the Semantic WebWhat is the Semantic Web
What is the Semantic Web
 
Some news about the SW
Some news about the SWSome news about the SW
Some news about the SW
 
What is the Semantic Web (in 15 minutes...)
What is the Semantic Web (in 15 minutes...)What is the Semantic Web (in 15 minutes...)
What is the Semantic Web (in 15 minutes...)
 
Semantic Web Tutorial at ESTC2008, Vienna, on September 24, 2008
Semantic Web Tutorial at ESTC2008, Vienna, on September 24, 2008Semantic Web Tutorial at ESTC2008, Vienna, on September 24, 2008
Semantic Web Tutorial at ESTC2008, Vienna, on September 24, 2008
 
États des lieux du Web sémantique
États des lieux du Web sémantiqueÉtats des lieux du Web sémantique
États des lieux du Web sémantique
 

Introduction to RDFa

  • 1. 2011 Semantic Technologies Conference 7th of June, 2011, San Francisco, CA, USA Ivan Herman, W3C
  • 2. }  For RDF people, it sounds very simple: §  RDFa is a serialization of RDF embedded in XHTML, HTML, or XML in general (2)
  • 3. (3)
  • 4. (4)
  • 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? (5)
  • 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 (6)
  • 7. }  Add extra structured content to the (X)HTML pages }  Let processors extract those and turn into RDF (7)
  • 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 (8)
  • 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 (9)
  • 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 (10)
  • 11. (11)
  • 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 (12)
  • 13. (13)
  • 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 (14)
  • 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 (15)
  • 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 (16)
  • 17. XML XHTML HTML5 Atom SVG … RDFa Core 1.1 }  Formally: §  RDFa WG defines Core and XHTML §  HTML WG defines HTML5 §  other groups may define others (like Atom) }  this tutorial uses XHTML examples (17)
  • 18. (18)
  • 19. (19)
  • 20. <p about="http://www.w3.org/ns/entailment/RDFS" property="http://purl.org/dc/terms/description"> Unique identifier for <em>RDFS Entailment</em>.</p> (20)
  • 21. <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> … . (21)
  • 22. <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> … . (22)
  • 23. <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." . (23)
  • 24. (24)
  • 25. <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> (25)
  • 26. <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> …. (26)
  • 27. <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> … . (27)
  • 28. <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/> . (28)
  • 29. (29)
  • 30. }  The combination of @about with @rel/@property and possibly @href covers most of we need… }  But this is too complex for authors (30)
  • 31. <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." . (31)
  • 32. }  Use compact URI-s when possible }  Make use of the natural structure for §  shared subjects §  shared predicates §  create blank nodes §  … (32)
  • 33. }  Just like in Turtle: §  define a prefix via @prefix §  use prefix:reference to abbreviate a URI (33)
  • 34. <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> (34)
  • 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://…" (35)
  • 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 (36)
  • 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) (37)
  • 38. }  The basic principle: @about is inherited by children nodes §  i.e., no reason to repeat it (38)
  • 39. <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> (39)
  • 40. @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." . (40)
  • 41. (41)
  • 42. <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" . (42)
  • 43. <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 . (43)
  • 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… (44)
  • 45. <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 . (45)
  • 46. (46)
  • 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? (47)
  • 48. }  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.,: <span about="http://www.ivan-herman.net/foaf#me"> <span rel="rdfs:seeAlso" resource="http://www.w3.org/People/Ivan/">Activity Lead</span> </span> (48)
  • 49. }  Here is what we would like to have in RDFa <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:ivan@w3.org> ; foaf:workplaceHomepage <http://www.w3.org> . (49)
  • 50. }  A straightforward way: <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:ivan@w3.org">ivan@w3.org</a>, <a rel="foaf:workplaceHomepage" href="http://www.w3.org">W3C</a> </span> </address> (50)
  • 51. }  A straightforward way: <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:ivan@w3.org">ivan@w3.org</a>, <a rel="foaf:workplaceHomepage" href="http://www.w3.org">W3C</a> </span> </address> (51)
  • 52. }  An alternative: <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:ivan@w3.org">ivan@w3.org</a>, <a rel="foaf:workplaceHomepage" href="http://www.w3.org">W3C</a> </span> </address> (52)
  • 53. }  @resource (or @href) becomes a subject for the sub- tree }  This feature is a bit like in RDF/XML (53)
  • 54. (54)
  • 55. }  Blank nodes can be created using “_:XX” }  Shorthand for RDF types }  Helping single-vocabulary cases }  Profiles (55)
  • 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 (56)
  • 57. <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" . (57)
  • 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! (58)
  • 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! (59)
  • 60. <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:ivan@w3.org">ivan@w3.org</a>, <a rel="foaf:workplaceHomepage" href="http://www.w3.org">W3C</a> </address> (60)
  • 61. <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:ivan@w3.org">ivan@w3.org</a>, <a rel="workplaceHomepage" href="http://www.w3.org">W3C</a> </address> (61)
  • 62. <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:ivan@w3.org">ivan@w3.org</a>, <a rel="workplaceHomepage" href="http://www.w3.org">W3C</a> </address> (62)
  • 63. <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:ivan@w3.org">ivan@w3.org</a>, <a rel="workplaceHomepage" href="http://www.w3.org">W3C</a> </address> (63)
  • 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! (64)
  • 65. }  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" – … (65)
  • 66. <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>, … (66)
  • 67. <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>, … (67)
  • 68. <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>, … (68)
  • 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 (69)
  • 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! (70)
  • 71. <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> (71)
  • 72. <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> (72)
  • 73. (73)
  • 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… (74)
  • 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 (75)
  • 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 (76)
  • 77. (77)
  • 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 (78)
  • 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) (79)
  • 80. (80)Courtesy of Jay Myers, BestBuy, SemTech2010 Presentation
  • 81. (81)Courtesy of Jay Myers, BestBuy, SemTech2010 Presentation
  • 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… (82)
  • 83. (83)
  • 84. (84)
  • 85. (85)
  • 86. (86)
  • 87. }  Major CMS system }  Has RDF at his core, pages contain RDFa }  In one step millions of pages of additional RDF data! (87)
  • 88. (88)
  • 89. (89)
  • 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 (90)
  • 91. }  RDFa is an essential bridge between the Semantic Web and the Web Developers’ communities }  Is also an alternative serialization of RDF }  Use it! (91)
  • 92. These slides are also available on the Web: http://www.w3.org/2011/Talks/0607-SemTech-RDFa-IH/ (92)