rdfa basics

16
RDFa 1.1 Basics Rich Structured Data Mark-up for Web Documents

Upload: guangyuan-piao

Post on 17-Dec-2014

477 views

Category:

Internet


3 download

DESCRIPTION

RDFa basics for who would like to get to know RDFa

TRANSCRIPT

Page 1: RDFa Basics

RDFa 1.1 BasicsRich Structured Data Mark-up for Web

Documents

Page 2: RDFa Basics

What Browsers see What Humans see

▶ The missing piece is the meaning of the web page’s visual elements

What’s the missing piece of the web?

Page 3: RDFa Basics

What Browsers see What Humans see

▶ RDFa is a bridge between the Web of Documents and the Web of Data

What’s RDFa?

Add machine-readable hints to webpage

Page 4: RDFa Basics

Add machine-readable hints to webpage

RDFa Example

▶ By adding machine-readable hints (property like “title” and “created”, which are well-defined vocabularies in the described (URI) resources, browsers be could able to know the meaning that can be represented as triples.

▶ By adding machine-readable hints (property like “title” and “created”, which are well-defined vocabularies in the described (URI) resources, browsers be could able to know the meaning that can be represented as triples.

Page 5: RDFa Basics

Problem#1 : Isn’t it so difficult to add so long property value for every single element?

▶ RDFa alleviate the problem by setting default vocab attribute to let the author declare a single vocabulary for a chunk of HTML.

▶ RDFa alleviate the problem by setting default vocab attribute to let the author declare a single vocabulary for a chunk of HTML.

Setting default vocab

Page 6: RDFa Basics

Vocab attribute example

The first vocab attribute

The second vocab attribute

▶ The vocab in the license paragraph overrides the definition inherited from the body of the document.

▶ The vocab in the license paragraph overrides the definition inherited from the body of the document.

Page 7: RDFa Basics

Example with FOAF vocabulary

Page 8: RDFa Basics

Example with FOAF vocabulary

Page 9: RDFa Basics

Problem#2 : What if there’s repeated pattern?

Page 10: RDFa Basics

▶ RDFa alleviate the problem by using rdfa:copy and the magic type rdfa:Pattern ▶ RDFa alleviate the problem by using rdfa:copy and the magic type rdfa:Pattern

Page 11: RDFa Basics

Problem#3 : How to make internal reference?

If the left Alice could be refer to the right Alice resource which already is described with RDFa mark-up, the browser could know the Alice is the person we already described in the right as well.

If the left Alice could be refer to the right Alice resource which already is described with RDFa mark-up, the browser could know the Alice is the person we already described in the right as well.

Page 12: RDFa Basics

Problem#3 : How to make internal reference?

▶ The resource attribute appears, in this case, together with property on the same element: in this situation resource indicates the target of the relation.

▶ The resource attribute appears, in this case, together with property on the same element: in this situation resource indicates the target of the relation.

Page 13: RDFa Basics

Problem#4 : How to use multiple vocabularies? - it will be complicated if we use different vocabularies interwined and in different places of the webpage

Page 14: RDFa Basics

Problem#4 : How to use multiple vocabularies?

▶ RDFa offers the possibility of using prefixed terms: a special prefix attribute can assign prefixes to represent URLs and, using those prefixes, the vocabulary elements themselves can be abbreviated. The prefix:reference syntax is used: the URL associated with prefix is simply concatenated to reference to create a full URL.

▶ RDFa offers the possibility of using prefixed terms: a special prefix attribute can assign prefixes to represent URLs and, using those prefixes, the vocabulary elements themselves can be abbreviated. The prefix:reference syntax is used: the URL associated with prefix is simply concatenated to reference to create a full URL.

Page 15: RDFa Basics

RDFa Tool

Page 16: RDFa Basics