1 / 19

An Introduction to RDFa

Learn about RDFa and how it allows for embedding RDF expressions in existing markup languages like XHTML, enabling extraction of fine-grained structured details from web pages.

sholesj
Download Presentation

An Introduction to RDFa

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Introduction to RDFa QingXia Liu

  2. Contents • What is RDFa? • Why RDFa? • Versions of RDFa • An Example

  3. What is RDFa? • Resource Description Framework in attributes • First proposed by Mark Birbeck in 2004 • A W3C Recommendation

  4. What is RDFa? • The gap between what programs and humans understand: What browsers see what humans see

  5. What is RDFa? • Aim: to allow a single RDF graph to be carried in various types of document markup.

  6. What is RDFa? • Essence: it provides a set of markup attributes to augment the visual information on the Web with machine-readable hints. • These attributes are: about, src, rel, rev, href, resource, property, content, datatype, typeof…

  7. What is RDFa? HTML : <body> ... <div > <h2 >The trouble with Bob</h2> <p>Date: <span >2011-09-10</span></p> <h3 >Alice</h3> ... </div> ... <div> <h2 >Jo's Barbecue</h2> <p>Date: <span >2011-09-14</span></p> <h3 >Eve</h3> ... </div> ... </body> HTML + RDFa 1.1: <body vocab="http://purl.org/dc/terms/"> ... <div resource="/alice/posts/trouble_with_bob"> <h2 property="title">The trouble with Bob</h2> <p>Date: <span property="created">2011-09-10</span></p> <h3 property="creator">Alice</h3> ... </div> ... <div resource="/alice/posts/jos_barbecue"> <h2 property="title">Jo's Barbecue</h2> <p>Date: <span property="created">2011-09-14</span></p> <h3 property="creator">Eve</h3> ... </div> ... </body> mark up human-readable data with machine-readable indicators

  8. What is RDFa? • Example: <body vocab="http://purl.org/dc/terms/"> <div resource="/alice/posts/trouble_with_bob"> <h2 property="title">The trouble with Bob</h2> <p>Date: <span property="created">2011-09-10</span></p> <h3 property="creator">Alice</h3> </div> <div resource="/alice/posts/jos_barbecue"> <h2 property="title">Jo's Barbecue</h2> <p>Date: <span property="created">2011-09-14</span></p> <h3 property="creator">Eve</h3> </div> </body>

  9. Why RDFa? • Embedding RDFsubject-predicate-object expressions in existing markup languages such as XHTML. • Enables the extraction of RDF model triples by compliant user agents • Apps: • To provide richer search results by extracting fine-grained structured details from the Web pages they crawl.

  10. Versions • RDFa 1.0 • was specified only for XHTML • RDFa 1.1 • is the newer version specified for both XHTML and HTML5. • also works for any XML-based languages like SVG

  11. Changes • Differences between RDFa 1.1 and RDFa1.0: • The removal of the specific rules for XHTML - these are now defined in XHTML + RDFa • Dayatype Expansion : RDFa attributes can contain Terms, CURIES, or Absolute IRIs. • Host languages are permitted to define collections of default terms, default prefix mappings, and a default vocabulary • The ability to define a default vocabulary to use for Terms that are undefined (via @vocab).. • Terms are required to be compared in a case-insensitive manner. • A richer behavior of the @property attribute, that can replace, in many cases the @rel attribute. • A slightly different handling of @typeof, making it better adapted to practical usage.

  12. Current Status • Standards: 2012-06-07 • RDFa Core 1.1 • XHTML+RDFa 1.1 • RDFa Lite 1.1 • Group Notes: before 2012-07-05 RDFa API , RDF Interfaces, RDFa 1.1 Primer, HTML Data Guide, XML in HTML Meeting Report • Drafts: 2012-03-29 HTML+RDFa1.1

  13. Example <div vocab="http://purl.org/dc/terms/"> <div resource="/alice/posts/trouble_with_bob"> <h2 property="title">The trouble with Bob</h2> ... <h3 vocab="http://xmlns.com/foaf/0.1/" property="http://purl.org/dc/terms/creator" typeof="Person"> <span property="name">Alice Birpemswick</span>, Email: <a rel="mbox" href="mailto:alice@example.com">alice@example.com</a>, Phone: <a rel="phone" href="tel:+1-617-555-7332">+1 617.555.7332</a> </h3> ... </div> ... </div>

  14. Example <div vocab="http://purl.org/dc/terms/"> <div resource="/alice/posts/trouble_with_bob"> <h2 property="title">The trouble with Bob</h2> ... <h3 vocab="http://xmlns.com/foaf/0.1/" property="http://purl.org/dc/terms/creator" typeof="Person"> <span property="name">Alice Birpemswick</span>, Email: <a rel="mbox" href="mailto:alice@example.com">alice@example.com</a>, Phone: <a rel="phone" href="tel:+1-617-555-7332">+1 617.555.7332</a> </h3> ... </div> ... </div>

  15. Example

  16. Example <div vocab="http://purl.org/dc/terms/"> <div resource="/alice/posts/trouble_with_bob"> <h2 property="title">The trouble with Bob</h2> <h3 property="creator" resource="#me">Alice</h3> ... </div> </div> ... • <div class="sidebar" vocab="http://xmlns.com/foaf/0.1/" resource="#me" typeof="Person"> • <p> • <span property="name">Alice Birpemswick</span>, • Email: <a property="mbox" href="mailto:alice@example.com">alice@example.com</a>, • Phone: <a property="phone" href="tel:+1-617-555-7332">+1 617.555.7332</a> • </p> • ... • </div>

  17. Example

  18. References • The W3C RDFa 1.1 Primer • The W3C RDFa 1.1 Core • The Wikipedia entry on RDFa

  19. Thank you !

More Related