RDFa

The educational technology and digital learning wiki
Revision as of 14:28, 23 April 2007 by Daniel K. Schneider (talk | contribs) (using an external editor)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Draft

Definition

RDFa is a syntax for expressing this structured data in XHTML. The rendered, hypertext data of XHTML is reused by the RDFa markup, so that publishers don't repeat themselves. The underlying abstract representation is RDF, which lets publishers build their own vocabulary, extend others, and evolve their vocabulary with maximal interoperability over time. The expressed structure is closely tied to the data, so that rendered data can be copied and pasted along with its relevant structure. (RDFa Primer 1.0 Embedding RDF in XHTML, retrieved 14:28, 23 April 2007 (MEST)).

Current web pages, written in HTML, contain significant inherent structured data. When publishers can express this data more completely, and when tools can read it, a new world of user functionality becomes available, letting users transfer structured data between applications and web sites. An event on a web page can be directly imported into a user's desktop calendar. A license on a document can be detected so that the user is informed of his rights automatically. A photo's creator, camera setting information, resolution, and topic can be published as easily as the original photo itself, enabling structured search and sharing. (RDFa Syntax, retrieved 14:28, 23 April 2007 (MEST))

RDFa is a syntax for expressing this structured data in XHTML. The rendered, hypertext data of XHTML is reused by the RDFa markup, so that publishers don't repeat themselves. The underlying abstract representation is RDF, which lets publishers build their own vocabulary, extend others, and evolve their vocabulary with maximal interoperability over time. The expressed structure is closely tied to the data, so that rendered data can be copied and pasted along with its relevant structure. (RDFa Syntax, retrieved 14:28, 23 April 2007 (MEST))

As an alternative, see Microformats and in particular "semantic XHTML".

Example

This short example taken from the Primer shows that RDF data can be embedded within "rel" and "property" attributes.

The clueless HTML version
<html>
   <head><title>Jo's Blog</title></head>
   <body>
...
   <p>
       I'm giving a talk at the XTech Conference about web widgets, on May 8th at 10am.
   </p>
...
   <p class="contactinfo">
       My name is Jo Smith. I'm a distinguished web engineer
       at
       <a href="http://example.org">
           Example.org
       </a>.
       You can contact me
       <a href="mailto:jo@example.org">
           via email
       </a>.
   </p>
...
   </body>

</html>


The RDFa version

As you can see it refers to two well known namespaces, i.e. ICAL and VCARD.

<html xmlns:cal="http://www.w3.org/2002/12/cal/ical#"
     xmlns:contact="http://www.w3.org/2001/vcard-rdf/3.0#">
...

I'm giving a talk at the XTech Conference about web widgets , on May 8th at 10am .

...

My name is Jo Smith . I'm a distinguished web engineer at <a rel="contact:org" href="http://example.org"> Example.org </a>. You can contact me <a rel="contact:email" href="mailto:jo@example.org"> via email </a>.

...


The extracted RDF triplet

A RDF parser now could extract for instance the following information from this file:

 <http://jo-blog.example.org/blog/?p=123#xtech_conference_talk>
      rdf:type cal:Vevent; 
      cal:summary "a talk at the XTech Conference about web widgets"^^XMLLiteral;    cal:dtstart "20070508T1000+0200" .

References

Standards
Bodies (organizations)