rdfa basics
DESCRIPTION
RDFa basics for who would like to get to know RDFaTRANSCRIPT
RDFa 1.1 BasicsRich Structured Data Mark-up for Web
Documents
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?
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
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.
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
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.
Example with FOAF vocabulary
Example with FOAF vocabulary
Problem#2 : What if there’s repeated pattern?
▶ 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
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.
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.
Problem#4 : How to use multiple vocabularies? - it will be complicated if we use different vocabularies interwined and in different places of the webpage
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.
RDFa Tool