03 Semantic Web Technologies - RDFS and RDFa
Upcoming SlideShare
Loading in...5
×
 

03 Semantic Web Technologies - RDFS and RDFa

on

  • 1,065 views

 

Statistics

Views

Total Views
1,065
Views on SlideShare
981
Embed Views
84

Actions

Likes
1
Downloads
85
Comments
1

3 Embeds 84

http://www.yovisto.com 76
http://yovisto.com 6
http://yovisto.de 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    03 Semantic Web Technologies - RDFS and RDFa 03 Semantic Web Technologies - RDFS and RDFa Presentation Transcript

    • Semantic Web Technologies Lecture Dr. Harald Sack Hasso-Plattner-Institut für IT Systems Engineering University of Potsdam Winter Semester 2012/13 Lecture Blog: http://semweb2013.blogspot.com/ This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)Dienstag, 30. Oktober 12
    • Semantic Web Technologies Last Lecture....2 D F R Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Semantic Web Technologies Content3 1. Introduction 2. Semantic Web - Basic Architecture Languages of the Semantic Web - Part 1 3. Knowledge Representation and Logics Languages of the Semantic Web - Part 2 4. Applications in the ,Web of Data‘ Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • FS D4 R SO ... WE NEED A WAY TO DEFINE RDF SCHEMATA FOR CLASSES AND RELATIONS ?! Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Semantic Web Technologies Content5 2. Semantic Web Basic Architecture The Languages of the Semantic Web - Part 1 • Uniform Resource Identifier - URI • Recapitulation: XML and XMLSchema • Resource Description Framework - RDF • RDF Schema • How Do We Get Semantics into WWW? • µFormats, schema.org, RDFa and GRDDL • Query Language SPARQL • Why RDF(S) is not enough Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • 2. Semantic Web - Basic Architecture Languages of the Semantic Web - Part 16 Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Why RDFSchema...?7 • An application program can define and use RDF data • ….if the application program knows, which terms and classes to use, as e.g. • name, title, year, … • name, blog, phone number… • author, cites, … • But..... • Are all terms known? • Are all terms correct? • Are there (logical) relations among the terms? • We need a language for data definition: RDF Schema • officially called “RDF Vocabulary Description Language” Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFSchema8 • First W3C draft in April 1998, W3C Recommendation Feb. 2004. • RDF Schema defines a data model for the creation of RDF statements • abstract data type (class) • hierarchical class model and class inheritance (subclasses) • Syntax for common data exchange • = „Language for the definition of structured vocabularies.“ Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFSchema9 • RDFSchema allows: • Definition of classes •Class instantiation in RDF via <rdf:type> • Definition of properties and restrictions • Definition of hierarchies •Subclasses and superclasses Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Example10 class Person class subClassOf domain property class Course range is managed by Staff subClassOf subClassOf subClassOf class class subClassOf class class Seminar Lecture Prof. Senior Researcher RDFS rdf:type rdf:type RDF exv:SemanticWebTechnologies exv:HaraldSack exv:isManagedBy Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Vocabulary11 • Classes • rdfs:Resource every entity of an RDF model is instance of this class • rdf:Property Base class for properties • rdfs:Class Concept of a class, defines an abstract object and is applied (with rdf:type) to create instances • rdfs:Literal Class for literals • and additionally rdfs:Datatype, rdf:XMLLiteral, rdfs:Container, rdfs:ContainerMembershipProperty Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Vocabulary12 •Properties • rdfs:subClassOf transitive property to define inheritance hierarchies for classes • rdfs:subPropertyOf transitive property to define inheritance hierarchies for properties • rdfs:domain defines the domain of a property concerning a class • rdfs:range defines range of a property concerning a class Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Vocabulary13 ■Properties □ rdfs:subClassOf transitive property to define inheritance hierarchies for classes (1) (2) (3) Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Vocabulary1514 ■Properties □ rdfs:subPropertyOf transitive property to define inheritance hierarchies for properties (1) (2) (3) Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Language Model t t rdfs:Class rdfs:Resource s t t s s t rdfs:Literal rdf:Property rdf:type t t t t rdfs:comment t rdfs:range rdfs:domain rdfs:subClassOf s – subclass relation rdfs:subPropertyOf t – instance relation Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Vocabulary16 • Further Properties • rdfs:seeAlso defines a relation of a resource to another, which explains it • rdfs:isDefinedBy subproperty of rdf:seeAlso, defines the relation of a resource to its definition • rdfs:comment comment, usually as text • rdfs:label „readable“ name of a resource (contrary to ID) Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDF(S) Knowledge Base17 T-Box class Terminologcal Knowledge Person class subClassOf domain property class Course range is managed by Staff subClassOf subClassOf subClassOf class class subClassOf class class Seminar Lecture Prof. Senior Researcher RDFSA-Box rdf:type RDF rdf:typeAssertional Knowledge exv:SemanticWebTechnologies exv:HaraldSack exv:isManagedBy Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Example @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> Turtle @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. @base <http://hpi-web.de/ws1213> :Course a rdfs:Class . :Lecture a rdfs:Class; rdfs:subClassOf :Course. :Seminar a rdfs:Class ; rdfs:subClassOf :Course. :Person a rdfs:Class . :Staff a rdfs:Class ; rdfs:subClassOf :Person . :SeniorResearcher a rdfs:Class ; rdfs:subClassOf :Staff . :isManagedBy a rdf:Property; rdfs:domain :Course ; rdfs:range :Staff . :SemanticWebTechnologies a :Lecture . :HaraldSack a :SeniorResearcher . :SemanticWebTechnologies :isManagedBy :HaraldSack . Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Summary • RDFSchema defines a data model for the definition of simple ontologies (knowledge representations). • Via RDFSchema ontologies RDF statements (facts) can be expressed • More than XML: • (small) ontological agreement about modelling primitives • Possibility to define own vocabularies • Next steps: • more logic • Constrains, dependencies, and rules Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • led ge kn ow mu ch (S) Ho w sR DF tics ) ha (s em an Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • How much knowledge (semantics) has RDF(S) rdfs:Class rdfs:Class rdfs:Property exv:Lecture exv:takesPlace exv:Event rdf:type rdf:type exv:SemanticWebTechnologies exv:takes Place exv:hasRoom exv:hasName HS3 Semantic Web Technologies exv:hasDate Tue 13.30-15.00 Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • How much knowledge (semantics) has RDF(S) rdfs:Class rdfs:Class rdfs:Property exv:Lecture exv:takesPlace exv:Event rdf:type rdf:type exv:SemanticWebTechnologies exv:takes Place exv:hasRoom exv:hasName HS3 Semantic Web Technologies exv:hasDate Tue 13.30-15.00 • The semantics of a term from an RDF(S) ontology is given in terms of its properties and its values (instances) Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • an we ion sc Co nc lus F(S )? Wh at ith RD ed uc ew d Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • What conclusions can we deduce with RDF(S)? rdfs:Class rdfs:Class rdfs:Property exv:Lecture exv:takesPlace exv:Event rdf:type exv:SemanticWebTechnologies exv:takes place • Deduction of entity class membership from the domain of one of its properties Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • What conclusions can we deduce with RDF(S)? rdfs:Class rdfs:Class rdfs:Property exv:Lecture exv:takesPlace exv:Event rdf:type rdf:type exv:SemanticWebTechnologies exv:takes place • Deduction of entity class membership from the range of one of its properties Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • What conclusions can we deduce with RDF(S)? rdfs:Class exv:Course rdfs:subClassOf rdf:type rdfs:Class rdfs:Property exv:Lecture exv:takesPlace exv:Event rdfs:Class rdf:type rdf:type exv:SemanticWebTechnologies exv:takesPlace • Deduction of entity superclass membership from a class hierarchy. Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • What conclusions can we deduce with RDF(S)? rdfs:Class rdfs:Property exv:Person exv:isParentOf exv:Person rdfs:subPropertyOf rdfs:Property exv:Person exv:isMotherOf exv:Person rdfs:Class rdfs:Class rdf:type rdf:type exv:Alice exv:Bob exv:isMotherOf exv:Alice exv:Bob exv:isParentOf • Deduction of new facts from subproperty relationships Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • cie nt for (S) s uffi tat ion Is R DF pre sen ge Re b? o wl ed ntic We Kn Se ma in the Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Semantic Web Technologies Content29 2. Semantic Web Basic Architecture The Languages of the Semantic Web - Part 1 • Uniform Resource Identifier - URI • Recapitulation: XML and XMLSchema • Resource Description Framework - RDF • RDF Schema • How Do We Get Semantics into WWW? • µFormats, schema.org, RDFa and GRDDL • Query Language SPARQL • Why RDF(S) is not enough Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • 2. Semantic Web - Basic Architecture Languages of the Semantic Web - Part 130 Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Semantic Annotation in the Web • RDF/XML can directly be embedded in an HTML document via <head> and <script> • RFC 3870 defines Mime-Type application/rdf+xml <head> <title>My Document</title> <script type="application/rdf+xml"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:Description rdf:about="http://www.w3.org/" dc:title="W3C Homepage"/> </rdf:RDF> </script> </head> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Semantic Annotation in the Web • W3C recommends linking of external RDF documents via HTML <link> element in HTML <head> <link rel="meta" type="application/rdf+xml" href="Meta-Data-for-Web-Page.rdf"/> • RDF documents can also embedded via <a href=...> and additional markup (e.g. RDF logo) withinin HTML <body> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Semantic Annotation in the Web • Problem: HTML and RDF data are separate wep page HTML RDF data Turtle <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan %209%20from%20outer%20space&lp=6&cp=1> <http:// ogp.me/ns#title> "Plan 9 from Outer Space - DVD" . <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan %209%20from%20outer%20space&lp=6&cp=1> <http:// ogp.me/ns#type> "product" . <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan %209%20from%20outer%20space&lp=6&cp=1> <http:// ogp.me/ns#url> "http://www.bestbuy.com:80/site/Plan-9- from-Outer-Space---DVD/6429224.p? id=23883&skuId=7167941" . • Maintenance <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan • Verification • Consistency %209%20from%20outer%20space&lp=6&cp=1> <http:// ogp.me/ns#image> "http://images.bestbuy.com:80/ BestBuy_US/images/products/6429/6429224s.jpg" . <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan Hasso-Plattner-Institut, Universität Potsdam Semantic Web Technologies , Dr. Harald Sack, %209%20from%20outer%20space&lp=6&cp=1> <http://Dienstag, 30. Oktober 12
    • Semantic Annotation in the Web • ,Embed‘ RDF into HTML wep page HTML RDF data Turtle <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan %209%20from%20outer%20space&lp=6&cp=1> <http:// ogp.me/ns#title> "Plan 9 from Outer Space - DVD" . <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan %209%20from%20outer%20space&lp=6&cp=1> <http:// ogp.me/ns#type> "product" . <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan %209%20from%20outer%20space&lp=6&cp=1> <http:// ogp.me/ns#url> "http://www.bestbuy.com:80/site/Plan-9- from-Outer-Space---DVD/6429224.p? id=23883&skuId=7167941" . <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan %209%20from%20outer%20space&lp=6&cp=1> <http:// ogp.me/ns#image> "http://images.bestbuy.com:80/ BestBuy_US/images/products/6429/6429224s.jpg" . <http://www.bestbuy.com/site/Plan+9+from+Outer+Space +-+DVD/7167941.p?id=23883&skuId=7167941&st=plan Hasso-Plattner-Institut, Universität Potsdam Semantic Web Technologies , Dr. Harald Sack, %209%20from%20outer%20space&lp=6&cp=1> <http://Dienstag, 30. Oktober 12
    • Semantic Annotation in the Web Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Semantic Annotation in the Web • In principle there are three ways to embed structured data with explicit semantic annotations within HTML documents • Domain specific microformats • Generic RDFa and embedded RDF • HTML5 Microdata including Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Microformats • Microformats (µformats) emerged about 2005 • (X)HTML Markup to express (limited) semantics in an HTML document • designed to solve simple, specific problems • designed for humans first, machines second • used in web pages to describe a specific type of information, as e.g. a person, an event, a product, a review, etc. • Applications can easily extract data from HTML documents • In general, Microformats use the class attribute in HTML tags (most times <span> or <div> tags) and assign brief and descriptive names to entities and their properties Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Microformats • Microformats reuse of the following (X)HTML tag attributes: • class • rel • rev • Predefined standard microformats: • hCard - personal data (vCard, RFC2426) • hCalender – calendars and events • rel-Tag – tags, keywords, categories • XFN – XHTML friends network • hReview, VoteLinks -- opinions, ratings, and reviews • XOXO – lists and outlines • ... http://microformats.org/ Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Microformats • Simple Example: HTML marked up with hCard microformat <div class="vcard"> <span class="fn">Joe Blow</span> <span class="title">Senior Manager</span> <span class="org">The Example Company</span> <span class="adr"> <span class="street-address">Hauptstr. 123, </span> <span class="postal-code">14482</span> <span class="locality">Potsdam</span> </span> Tel.<span class="tel">604-555-1234</span> <img class="photo" src="www.example.com/JoeBlow.jpg" /> </div> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Microformats • Microformats reuse existing (X)HTML attributs to encode structured data • Microformats can easily be transcoded to RDF via XSLT • New microformat vocabularies first must be consolidated by the community, while always a new XSLT stylesheet has to be developed for extraction • By using more than one microformat vocabulary in a single (X)HTML document the processing complexity increases rapidly • Conflicts with used (X)HTML attributes might be possible Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • RDFa = RDF in HTML attributes • enables generic RDF annotation in (X)HTML documents by reusing existing (X)HTML attributes • RDFa 1.0 based on XHTML (W3C Recommendation 2008) • RDFa 1.1 based on HTML5 (W3C Recommendation June 2012) • RDFa Lite 1.1 • RDFa 1.1 Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • RDFa Lite reuses existing HTML attributes •vocab, •typeof, •property, •resource, •prefix Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • First we need a vocabulary to talk about things <p vocab="http://xmlns.com/foaf/0.1/"> My name is Harald Sack and you can give me a ring via 1-800-555-0527. </p> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • Then we have to define the type of thing we are talking about <p vocab="http://xmlns.com/foaf/0.1/" typeof="Person"> My name is Harald Sack and you can give me a ring via 1-800-555-0527. </p> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa Lite • Now we can define all properties of the thing we are talking about <p vocab="http://xmlns.com/foaf/0.1/" typeof="Person"> My name is <span property="name">Harald Sack</span> and you can give me a ring via <span property="phone">1-800-555-0527</span>. <img property="img" src="http://hpi-web.de/images/harald.jpg" /> </p> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa Lite • We can create identifiers for the things we are talking about <p vocab="http://xmlns.com/foaf/0.1/" resource=“#harald“ typeof="Person"> My name is <span property="name">Harald Sack</span> and you can give me a ring via <span property="phone">1-800-555-0527</span>. <img property="img" src="http://hpi-web.de/images/harald.jpg" /> </p> • resource bezieht sich hier auf Basis-URL der Webseite Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa Lite • And if the vocabulary is not sufficient to describe all properties, we can use additional vocabularies by using prefixes <p vocab="http://xmlns.com/foaf/0.1/" prefix=“ov: http://open.vocab.org/terms/“ resource=“#harald“ typeof="Person"> My name is <span property="name">Harald Sack</span> and you can give me a ring via <span property="phone">1-800-555-0527</span>. My favorite beverage is <span property="ov:preferredBeverage">Green Tea </span>. </p> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • With RDFa you have can add additional functionality • separate content from presentation <p vocab="http://purl.org/dc/terms/" > <h2 property="title">Syllabus SWT 2012/13</h2> <h3 property="creator" resource="#me">Harald</h3> Creation Date: <span property="created" content="2012-10-28"> 28.10.2012 </span> </p> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • With RDFa you have can add additional functionality • use datatypes from XML Schema Definition <p vocab="http://purl.org/dc/terms/" > <h2 property="title">Syllabus SWT 2012/13</h2> <h3 property="creator" resource="#me">Harald</h3> Creation Date: <span property="created" datatype="xsd:gYear"> 2012 </span> </p> • alternatives: • resource <> about and property <> rel Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • Difference between resource and about <div resource="/alice/posts/trouble_with_bob"> <h2 property="title">The trouble with Bob</h2> <h3 property="creator" resource="#me">Alice</h3> ... </div> • The resource attribute in the <div> element sets the context, i.e. the subject for all subsequent statements. • Also, when combined with the property attribute, resource can be used to set the object for the statement Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • Difference between resource and about <ul resource="/alice/posts/trouble_with_bob"> ... <li resource="/alice/posts/trouble_with_bob"> <span property="title">The trouble with Bob</span> </li> <li resource="/alice/posts/jos_barbecue"> <span property="title">Jos Barbecue</span> </li> ... </ul> • ...works, but its a bit convoluted Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • Difference between resource and about <ul resource="/alice/posts/trouble_with_bob"> ... <li resource="/alice/posts/trouble_with_bob" property="title">The trouble with Bob</li> <li resource="/alice/posts/jos_barbecue" property="title">Jos Barbecue</li> ... </ul> • not correct; the combination of property and resource would generate a different statement than originally intended. Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • Difference between resource and about <ul resource="/alice/posts/trouble_with_bob"> <li about="/alice/posts/trouble_with_bob" property="title">The trouble with Bob</li> <li about="/alice/posts/jos_barbecue" property="title">Jos Barbecue</li> ... </li> • about is only used to set the context Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • Difference between property and rel <div vocab="http://xmlns.com/foaf/0.1/" resource="#me"> <ul rel="knows"> <li resource="http://example.com/bob/#me" typeof="Person"> <a property="homepage" href="http://example.com/bob/"> <span property="name">Bob</span></a> </li> <li resource="http://example.com/eve/#me" typeof="Person"> <a property="homepage" href="http://example.com/eve/"> <span property="name">Eve</span></a> </li> <li resource="http://example.com/harald/#me" typeof="Person"> <a property="homepage" href="http://example.com/harald/"> <span property="name">Harald</span></a> </li> </ul> </div> • rel never considers the textual content of an element • parser is always looking for a target (object) Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa • Distinguish two different sorts of RDF triples •Triple with resource as object •Triple with literal as object Subjekt Property Objekt content or Object is Literal resource/about property #PCDATA Object is Resource href or resource/about property/rel (URI) resource Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Differences with RDFa 1.0 <html> Namespace ... <div xmlns:dc="http://purl.org/dc/elements/1.1/"> Im currently reading Subject <span about=”urn:ISBN:0-596-00027-8”> <span property="dc:title"> Property Programming Perl Object </span> (Literal) by <span property="dc:creator">Larry Wall</span> </span>. </div> ... </html> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.0" xml:lang="en"> <head>...</head> <body>...</body> </html> </xml> XHTML <!DOCTYPE html> <html version="HTML+RDFa 1.1" lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"> HTML5 Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa RDFa is already applied by • Google, Yahoo • Facebook, MySpace, LinkedIn • Best Buy, Tesco, O’Reilly • SlideShare, Digg • WhiteHouse.gov, Library of Congress, UK government • Newsweek, BBC • ... Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa ...but how does HTML + RDFa become RDF? Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • http://www.flickr.com/photos/cho45/1402634073/ •Gleaning •Resource Descriptions •from Dialects of Languages Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • http://www.flickr.com/photos/cho45/1402634073/ • Gleaning Resource Descriptions from Dialects of Languages • GRDDL provides a simple way to extract RDF from (X)HTML documents • GRDDL applies transformations (XSLT Stylesheets) to extract •RDFa •Mircoformats •RSS • from (X)HTML documents Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • http://www.flickr.com/photos/cho45/1402634073/ • To extract semantic anotation from a document, GRDDL does 1. Detect GRDDL Profile metadata 2. Link/Fetch transformation data (Extraktors) 3. Apply transformations to convert into RDF Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • http://www.flickr.com/photos/cho45/1402634073/ GRDDL Profildata (XHTML only) <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head profile="http://www.w3.org/2003/g/data-view"> <link rel="transformation" href="http://ns.inria.fr/grddl/rdfa/2008/09/03/RDFa2RDFXML.xsl"/> </head> ... Title: <span property="dc:title"> Digitale Kommunikation: Vernetzung, Multimedia, Sicherheit GRDDL Transformation </span> Category: <span property="dc:subject">Computer Science</span> ... </html> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • http://www.flickr.com/photos/cho45/1402634073/ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head profile="http://www.w3.org/2003/g/data-view"> <link rel="transformation" href="http://ns.inria.fr/grddl/rdfa/2008/09/03/RDFa2RDFXML.xsl"/> </head> ... Title: <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" <span property="dc:title"> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> Digitale Kommunikation: Vernetzung, Multimedia, Sicherheit ... </span> <rdf:Description rdf:about=""> Category: <dc:title> <span property="dc:subject">Computer Science</span> Digitale Kommunikation: Vernetzung, Multimedia, Sicherheit ... </dc:title> </html> <dc:subject>Computer Science</dc:subject> </rdf:Description> ... </rdf:RDF> Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • RDFa ...more RDFa Extractors Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam http://rdfa.info/play/Dienstag, 30. Oktober 12
    • HTML5 Microdata • HTML5 Microdata extends microformats and addresses its shortcomings • schema.org is the most prominent microdata vocabulary Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • schema.org Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • schema.org • Initiative started by Bing, Google, Yahoo! on June 2, 2011. • Goals: • Semantic markup for web page content based on proprietary HTML5 microdata schemata •Search engines, web crawler, and Browser recognize and understand schema.org markup •small number of formats (extensible) •RDF mapping available Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • schema.org and Rich Snippets • Snippets = The few lines of text that appear under every search result • Designed to give users a sense for what’s on the web page and why it’s relevant to their query • If Google understands the content on the web page, it can create “Rich” Snippets • = detailed information intended to help users with specific queries • You can help Google find this relevant information by adding additional microdata as HTML markup Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • HTML5 Microdata • Microdata extends microformats and addresses its shortcomings • Microdata annotates the DOM with scoped name/value pairs from custom vocabularies • centered around custom vocabularies: anyone can define a microdata vocabulary and start embedding custom properties in their own web pages • works with name/value pairs: every microdata vocabulary defines a set of named properties • applies concept of “scoping”: microdata re-use the hierarchical structure of the DOM itself to provide a way to say “all the properties within this element are taken from this vocabulary” Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • HTML5 Microdata • HTML5 microdata specification comprises • microdata Vocabularies (http://data-vocabulary.org/) • Persons, Events, Organisations, Products, Reviews, Breadcrumbs, Ads, agreggated Reviews/Ads • microdata Global Attributes • itemscope (creates resource) • itemtype (applied vocabulary) • itemid (identifies resource) • itemprop (property of a resource) • itemref (references on other resources) Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • <section itemscope itemtype="http://data-vocabulary.org/Person"> Hello, my name is <span itemprop="name">John Doe</span>, I am a <span itemprop="title">graduate research assistant</span> at the <span itemprop="affiliation">University of Dreams</span>. My friends call me <span itemprop="nickname">Johnny</span>. You can visit my homepage at <a href="http://www.JohnnyD.com" itemprop="url">www.JohnnyD.com</a>. <section itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address"> I live at <span itemprop="street-address">1234 Peach Drive</span> <span itemprop="locality">Warner Robins</span> , <span itemprop="region">Georgia</span>. </section> </section> http://yovisto.com/labs/swt1112/microdata01.html Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • http://www.google.com/webmasters/tools/richsnippets Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • schema.org movies people recipes http://schema.org/docs/full.html Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • schema.org products music events ... http://schema.org/docs/full.html Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • schema.org •extends microdata vocabulary with proprietary category hierarchies: • Creative works: • CreativeWork, Book, Movie, MusicRecording, Recipe, TVSeries ... • Embedded non-text objects: • AudioObject, ImageObject, VideoObject • Event • Organization • Person • Place, LocalBusiness, Restaurant ... • Product, Offer, AggregateOffer • Review, AggregateRating •and according properties (relations) with different domain and range http://schema.org/docs/full.html Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • schema.org http://schema.org/docs/full.html Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • schema.org vs. RDFa Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • schema.org - RDFa Mapping 1.<div vocab="http://schema.org/" typeof="Product"> 2.  <img rel="image" src="dell-30in-lcd.jpg" /> 3.  <span property="name">Dell UltraSharp 30" LCD Monitor</span> 5.  <div rel="hasAggregateRating" > 6.    <div typeof="http://schema.org/AggregateRating"> 7.      <span property="ratingValue">87</span> 8.      out of <span property="bestRating">100</span> 9.      based on <span property="ratingCount">24</span> user ratings 10.    </div> 11. </div> 13.  <div rel="offers" > 14.    <div typeof="http://schema.org/AggregateOffer"> 15.      <span property="lowPrice">$1250</span> 16.       to <span property="highPrice">$1495</span> 17.        from <span property="offerCount">8</span> sellers 18.   </div> 19. </div> 20.... 21.</div> http://schema.org/docs/datamodel.html http://schema.rdfs.org/ Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Microdata Usage http://tripletalk.wordpress.com/2011/01/25/rdfa-deployment-across-the-web/ Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • Semantic Web Technologies Content82 2. Semantic Web Basic Architecture The Languages of the Semantic Web - Part 1 • Uniform Resource Identifier - URI • Recapitulation: XML and XMLSchema • Resource Description Framework - RDF • RDF Schema • How Do We Get Semantics into WWW? • µFormats, schema.org, RDFa and GRDDL • Query Language SPARQL • Why RDF(S) is not enough Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • 83 Q L A R SP Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, via http://www.snee.com/bobdc.blog/2008/10/learning-more-about-sparql.html Universität PotsdamDienstag, 30. Oktober 12
    • 2. Semantic Web Basic Architecture 2.4 RDF Schema 2.5 How Do We Get Semantics into WWW?84 Bibliography • P. Hitzler, S. Roschke, Y. Sure: Semantic Web Grundlagen, Springer, 2007. • P. Hitzler, M. Krötzsch, S. Rudolph: Foundations of Semantic Web Technologies, CRC Press, 2009. Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12
    • 2. Semantic Web Basic Architecture 2.1 Uniform Resource Identifier 2.2 XML und XMLSchema 2.3 Resource Description Framework85 □Blog http://semweb2013.blogspot.com/ □Webseite http://www.hpi.uni-potsdam.de/studium/ lehrangebot/itse/veranstaltung/ semantic_web_technologien-3.html □bibsonomy - Bookmarks http://www.bibsonomy.org/user/lysander07/ swt1213_03 Lecture Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 30. Oktober 12