1310_RDFa_Microformats_Atom

Download Report

Transcript 1310_RDFa_Microformats_Atom

RDFa, Microformats, and Atom
Semantic Web
Presented by: Anuradha Kandula
Instructor: Steven Seida
Background

Why do we need semantic markup?
To an English-speaking person, the same
information could be represented as:
“The title of this resource, published by
Wikipedia, is ‘Tony Benn’ ”


The purpose of RDF is to provide an
encoding and interpretation mechanism
so that resources can be described in a
way that particular software can
understand it
RDFa

RDFa
(or
Resource
Description
Framework - in - attributes) is a W3C
Recommendation that adds a set of
attribute level extensions to XHTML for
embedding rich metadata within Web
documents.
Essence

The essence of RDFa is to provide a set
of attributes that can be used to carry
metadata in an XML language (hence the
'a' in RDFa).

These attributes are:
o
about – a URI or CURIE specifying the resource the
metadata is about; in its absence it defaults to the current
document
Essence (cont.)
o
o
o
o
o
o
rel and rev – specifying a relationship or reverse-relationship
with another resource
href, src and resource – specifying the partner resource
property – specifying a property for the content of an
element
content – optional attribute that overrides the content of
the element when using the property attribute
datatype – optional attribute that specifies the datatype of
text specified for use with the property attribute
typeof – optional attribute that specifies the RDF type(s) of
the subject (the resource that the metadata is about).
Examples of RDFa
(FOAF profile using RDFa)
1.<html
xmlns:foaf="http://xmlns.com/foaf/0.1/">
2.
<head>
3.
<title>Mark Birbeck's profile</title>
4.
<link rel="foaf:primaryTopic foaf:maker" href="#me"/>
5.
</head>
6.
<body>
7.
<div about=“#me" typeof=foaf:Person">
8.
<span property="foaf:name">"Mark Birbeck</span>
9.
<a rel="foaf:weblog" href="http://internet-apps.blogspot.com/">XForms
and Internet Applications</a>
10.
<a rel="foaf:knows" href="http://www.w3.org/People/Ivan/#me">Ivan
Herman</a>
11.
<span rel="foaf:img">
12.
<img src="http://www.formsplayer.com/files/pictures/picture-11.jpg"/>
13.
</span>
14.
<span rel="foaf:holdsAccount">
15.
<span typeof="foaf:OnlineAccount">
16.
<a rel="foaf:accountServiceHomepage"
ref="http://twitter.com/">Twitter</a>
17.
<span property="foaf:accountName">markbirbeck</span>
18.
</span>
19.
</span>
20.
</div>
21.
</body>
22.</html>
Benefits of RDFa

Publisher Independence - each site can
use its own standards

Data Reuse - data is not duplicated.
Separate XML and HTML sections are
not required for the same content.

Schema Modularity - The attributes are
reusable

Evolvability - additional fields can be
added and XML transforms can extract
the semantics of the data from an
XHTML file
Microformat

A microformat is a web-based approach
to semantic markup that seeks to re-use
existing XHTML and HTML tags to
convey metadata and other attributes.
This approach allows information
intended for end-users (such as contact
information, geographic
coordinates,
calendar events, and the like) to also be
automatically processed by software.

Designed for humans first and machines
second, microformats are a set of simple,
open data formats built upon existing and
widely adopted standards. Instead of
throwing away what works today,
microformats intend to solve simpler
problems first by adapting to current
behaviors and usage patterns (e.g.
XHTML, blogging).
The microformats principles
Solve a specific problem
 Start as simple as possible
 Design for humans first, machines second
 Reuse building blocks from widely
adopted standards
 Modularity / embeddability
 Enable and encourage decentralized
development, content, services

hCard microformat markup
Browser support
Operator for Firefox
 Oomph for Internet Explorer
 hCard exported to formats compatible
with contact management
 hCalendar exported to formats
compatible with calander utilities
 geographical coordinates to Google Maps

Atom
Atom is an XML-based document format that
describes lists of related information known as
"feeds". Feeds are composed of a number of
items, known as "entries", each with an
extensible set of attached metadata. For
example, each entry has a title.
 The primary use case that Atom addresses is
the syndication of Web content such as weblogs
and news headlines to Web sites as well as
directly to user agents.


Atom is a simple way to read and write
information on the web, allowing you to
easily keep track of more sites in less
time, and to seamlessly share your words
and ideas by publishing to the web.
Web feeds allow software programs to
check for updates published on a website.
To provide a web feed, a site owner may
use specialized software (such as a
content management system) that
publishes a list (or "feed") of recent
articles or content in a standardized,
machine-readable format.
A feed contains entries, which may be
headlines, full-text articles, excerpts,
summaries, and/or links to content on a
website, along with various metadata.
Usage
Web feeds are used by the blogging community to
share recent entries' headlines, full text, and even
attached multimedia files. These providers allow
other websites to incorporate the blog's
"syndicated" headline or headline-and-shortsummary feeds under various usage agreements.
Atom and other web syndication formats are
now used for many purposes, including journalism,
marketing, bug-reports, or any other activity
involving periodic updates or publications. Atom
also provides a standard way to export an entire
blog, or parts of it, for backup or for importing
into other blogging systems.
It is common to find web feeds on major
Web sites, as well as many smaller ones.
Some websites let people choose
between RSS or Atom formatted web
feeds; others offer only RSS or only Atom.
In particular, many blog and wiki sites
offer their web feeds in the Atom format.
Feed reader
A feed reader or "aggregator" program
can be used to check feeds and display
new articles. Client-side readers may also
be designed as standalone programs or as
extensions to existing programs like web
browsers. Browsers are moving toward
integrated feed reader functions.
Single-entry Atom Feed Document
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>
The "atom:feed" Element







atom:feed elements MUST contain one or more atom:author
elements, unless all of the atom:feed element's child atom:entry
elements contain at least one atom:author element.
atom:feed elements MAY contain any number of atom:category
elements.
atom:feed elements MAY contain any number of atom:contributor
elements.
atom:feed elements MUST NOT contain more than one
atom:generator element.
atom:feed elements MUST NOT contain more than one atom:icon
element.
atom:feed elements MUST NOT contain more than one atom:logo
element.
atom:feed elements MUST contain exactly one atom:id element.
More information on atoms at:
http://www.ietf.org/rfc/rfc4287
Queries?
Thank You !