This document is also available in this non-normative format: diff to previous version .
Copyright © 2012 W3C ® ( MIT , ERCIM , Keio ), All Rights Reserved. W3C liability , trademark and document use rules apply.
RDFa
Lite
is
a
minimal
subset
of
RDFa
RDFa,
the
Resource
Description
Framework
in
attributes,
consisting
of
a
few
attributes
that
may
be
applied
to
most
simple
used
to
moderate
structured
express
machine-readable
data
markup
tasks.
in
Web
documents
like
HTML,
SVG,
and
XML.
While
it
is
not
a
complete
solution
for
advanced
data
markup
tasks,
it
does
work
for
most
day-to-day
needs
and
can
be
grasped
learned
by
most
Web
authors
with
minimal
effort.
in
a
day.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This
document
is
the
culmination
of
a
series
of
discussions
between
the
World
Wide
Web
Consortium,
including
the
RDF
Web
Applications
Working
Group,
the
Vocabularies
Community
Group,
the
HTML
Working
Group,
and
the
sponsors
of
the
schema.org
initiative,
including
Google,
Yahoo!,
Microsoft
and
Yandex.
It
has
recieved
review
from
representatives
in
these
organizations
and
enjoys
consensus
at
this
point
in
time.
The
only
change
that
was
changes
made
during
the
previous
Last
Call
Candidate
Recommendation
period
were
minor
editorial
changes.
The
first
change
was
to
clarify
that
the
replacement
usage
of
the
,
@about
with
href
,
@resource
src
which
was
noted
as
a
possible
change
rel
,
and
rev
attributes
were
to
be
considered
conforming
in
Host
Languages
that
allowed
their
usage.
The
second
set
of
changes
were
a
number
of
minor
grammatical
fixes
to
the
prose
of
the
Last
Call
document.
Only
minor
editorial
changes
fixes
to
the
grammar
and
prose
of
the
document
are
expected
during
the
Candidate
Proposed
Recommendation
phase.
The
implementation
report
used
by
the
director
to
transition
to
Proposed
Recommendation
has
been
made
available.
There
have
been
no
formal
objections
for
this
document.
The
end
of
the
Proposed
Recommendation
period
is
07
June
2012.
This
document
was
published
by
the
W3C
RDF
Web
Applications
Working
Group
as
a
Candidate
Proposed
Recommendation.
This
document
is
intended
to
become
a
W3C
Recommendation.
If
you
wish
to
make
comments
regarding
this
document,
please
send
them
to
public-rdfa-wg@w3.org
(
subscribe
,
archives
).
W3C
publishes
a
Candidate
Recommendation
to
indicate
that
the
document
is
believed
to
be
stable
and
to
encourage
implementation
by
the
developer
community.
This
Candidate
Recommendation
is
expected
to
advance
to
Proposed
Recommendation
no
earlier
than
30
April
2012.
All
feedback
is
welcome.
Publication
as
a
Candidate
Proposed
Recommendation
does
not
imply
endorsement
by
the
W3C
Membership.
This
is
a
draft
document
and
may
be
updated,
replaced
or
obsoleted
by
other
documents
at
any
time.
It
is
inappropriate
to
cite
this
document
as
other
than
work
in
progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy . W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy .
This section is non-normative.
The full RDFa syntax [ RDFA-CORE ] provides a number of basic and advanced features that enable authors to express fairly complex structured data, such as relationships among people, places, and events in an HTML or XML document. Some of these advanced features may make it difficult for authors, who may not be experts in structured data, to use RDFa. This lighter version of RDFa is a gentler introduction to the world of structured data, intended for authors that want to express fairly simple data in their web pages. The goal is to provide a minimal subset that is easy to learn and will work for 80% of authors doing simple data markup.
This section is non-normative.
RDFa
Lite
consists
of
five
simple
attributes;
vocab
,
typeof
,
property
,
resource
,
and
prefix
.
RDFa
1.1
Lite
is
completely
upwards
compatible
with
the
full
set
of
RDFa
1.1
attributes.
This
means
that
if
an
author
finds
that
RDFa
Lite
isn't
powerful
enough,
transitioning
to
the
full
version
of
RDFa
is
just
a
matter
of
adding
the
more
powerful
RDFa
attributes
into
the
existing
RDFa
Lite
markup.
RDFa, like Microformats [ MICROFORMATS ] and Microdata [ MICRODATA ], enables us to talk about things on the Web such that a machine can understand what we are saying. Typically when we talk about a thing, we use a particular vocabulary to talk about it. So, if you wanted to talk about People, the vocabulary that you would use would specify terms like name and telephone number . When we want to mark up things on the Web, we need to do something very similar, which is specify which vocabulary that we are going to be using. Here is a simple example that specifies a vocabulary that we intend to use to markup things in the paragraph:
<p vocab="http://schema.org/">
My name is Manu Sporny and you can give me a ring via 1-800-555-0199.
</p>
In
this
example
we
have
specified
that
we
are
going
to
be
using
the
vocabulary
that
can
be
found
at
http://schema.org/
.
This
is
a
vocabulary
that
has
been
released
by
major
search
engine
companies
to
talk
about
common
things
on
the
Web
that
Search
Engines
care
about
–
things
like
People,
Places,
Reviews,
Recipes,
and
Events.
Once
we
have
specified
the
vocabulary,
we
need
to
specify
the
type
of
the
thing
that
we're
talking
about.
In
this
particular
case
we
are
talking
about
a
Person,
which
can
be
marked
up
like
so:
<p vocab="http://schema.org/" typeof="Person">
My name is Manu Sporny and you can give me a ring via 1-800-555-0199.
</p>
Now all we need to do is specify which properties of that person we want to point out to the search engine. In the following example, we mark up the person's name, phone number and web page. Both text and URLs can be marked up with RDFa Lite. In the following example, pay particular attention to the types of data that are being pointed out to the search engine, which are highlighted in blue:
<p vocab="http://schema.org/" typeof="Person"> My name is <span property="name">Manu Sporny</span> and you can give me a ring via <span property="telephone">1-800-555-0199</span> or visit <a property="url" href="http://manu.sporny.org/">my homepage</a>. </p>
Now, when somebody types in “phone number for Manu Sporny” into a search engine, the search engine can more reliably answer the question directly, or point the person searching to a more relevant Web page.
If
you
want
Web
authors
to
be
able
to
talk
about
the
things
each
thing
on
your
page,
you
need
to
create
an
identifier
for
that
thing.
each
of
these
things.
Just
like
we
create
identifiers
for
parts
of
a
page
using
the
id
attribute
in
HTML,
you
can
create
identifiers
for
things
described
on
a
page
using
the
resource
attribute:
<p vocab="http://schema.org/" resource="#manu" typeof="Person">
My name is
<span property="name">Manu Sporny</span>
and you can give me a ring via
<span property="telephone">1-800-555-0199</span>.
<img property="image" src="http://manu.sporny.org/images/manu.png" />
</p>
If
we
assume
that
the
markup
above
can
be
found
at
http://example.org/people
,
then
the
identifier
for
the
thing
is
the
address,
plus
the
value
in
the
resource
attribute.
Therefore,
the
identifier
for
the
thing
on
the
page
would
be:
http://example.org/people#manu
.
This
identifier
is
also
useful
if
you
want
to
talk
about
the
that
same
thing
on
another
Web
page.
By
identifying
all
things
on
the
Web
using
a
unique
Uniform
Resource
Locator
(URL),
we
can
start
building
a
Web
of
things.
Companies
building
software
for
the
Web
can
use
this
Web
of
things
to
answer
complex
questions
like:
"What
is
Manu
Sporny's
phone
number
and
what
does
he
look
like?".
In some cases, a vocabulary may not have all of the terms an author needs when describing their thing . The last feature in RDFa 1.1 Lite that some authors might need is the ability to specify more than one vocabulary. For example, if we are describing a Person and we need to specify that they have a favorite animal, we could do something like the following:
<p vocab="http://schema.org/" prefix="ov: http://open.vocab.org/terms/" resource="#manu" typeof="Person"> My name is <span property="name">Manu Sporny</span> and you can give me a ring via <span property="telephone">1-800-555-0199</span>. <img property="image" src="http://manu.sporny.org/images/manu.png" /> My favorite animal is the <span property="ov:preferredAnimal">Liger</span>. </p>
The
example
assigns
a
short-hand
prefix
to
the
Open
Vocabulary
(
ov
)
and
uses
that
prefix
to
specify
the
preferredAnimal
vocabulary
term.
Since
schema.org
doesn't
have
a
clear
way
of
expressing
a
favorite
animal,
the
author
instead
depends
on
this
alternate
vocabulary
to
get
the
job
done.
RDFa
1.1
Lite
also
pre-defines
a
number
of
useful
and
popular
prefixes
,
such
as
dc
,
foaf
,
and
schema
.
This
ensures
that
even
if
authors
forget
to
declare
the
popular
prefixes,
that
their
structured
data
will
continue
to
work.
A
full
list
of
pre-declared
prefixes
can
be
found
in
the
initial
context
document
for
RDFa
1.1
.
If you would like to learn more about what is possible with RDFa Lite, including an introduction to the data model, please read the section on RDFa Lite in the RDFa Primer [ RDFA-PRIMER ].
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words must , must not , required , should , should not , recommended , may , and optional in this specification are to be interpreted as described in [ RFC2119 ].
In order for a document to be labeled as a conforming RDFa Lite 1.1 document :
vocab
,
typeof
,
property
,
resource
,
and
prefix
.
;
it
may
also
use
href
and
src
,
when
the
Host
Language
authorizes
the
usage
of
those
attributes.
However,
even
if
authorized
by
the
Host
Language,
the
usage
of
rel
and
rev
should
be
restricted
to
non-RDFa
usage
patterns,
as
defined
by
the
Host
Language.
xmlns
attribute
is
not
used
to
declare
CURIE
prefixes.
If additional non-RDFa Lite attributes are used from the RDFa Core 1.1 specification, the document must be referred to as a conforming RDFa 1.1 document . All conforming RDFa Lite 1.1 documents may be referred to as conforming RDFa 1.1 documents.