RDFa: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
Line 2: Line 2:
== Definition ==
== 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. ([http://www.w3.org/TR/xhtml-rdfa-primer/ RDFa Primer 1.0 Embedding RDF in XHTML], retrieved 14:29, 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. ([http://www.w3.org/TR/xhtml-rdfa-primer/ RDFa Primer 1.0 Embedding RDF in XHTML], retrieved 15:11, 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. ([http://www.w3.org/2006/07/SWD/RDFa/syntax/ RDFa Syntax], retrieved 14:29, 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. ([http://www.w3.org/2006/07/SWD/RDFa/syntax/ RDFa Syntax], retrieved 15:11, 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. ([http://www.w3.org/2006/07/SWD/RDFa/syntax/ RDFa Syntax], retrieved 14:29, 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. ([http://www.w3.org/2006/07/SWD/RDFa/syntax/ RDFa Syntax], retrieved 15:11, 23 April 2007 (MEST))


As an alternative, see [[Microformat]]s and in particular "[[semantic XHTML]]".
As an alternative, see [[Microformat]]s and in particular "[[semantic XHTML]]".
Line 44: Line 44:
As you can see it refers to two well known [[namespace]]s, i.e. ICAL and VCARD.
As you can see it refers to two well known [[namespace]]s, i.e. ICAL and VCARD.


  <html xmlns:cal="http://www.w3.org/2002/12/cal/ical#"
  &lt;html xmlns:cal="http://www.w3.org/2002/12/cal/ical#"
       xmlns:contact="http://www.w3.org/2001/vcard-rdf/3.0#">
       xmlns:contact="http://www.w3.org/2001/vcard-rdf/3.0#"&gt;
  ...
  ...
     <p class="cal:Vevent" about="#xtech_conference_talk">
     &lt;p class="cal:Vevent" about="#xtech_conference_talk"&gt;
         I'm giving
         I'm giving
         <span property="cal:summary">
         &lt;span property="cal:summary"&gt;
             a talk at the XTech Conference about web widgets
             a talk at the XTech Conference about web widgets
         </span>,
         &lt;/span&gt;,
         on
         on
         <span property="cal:dtstart" content="20070508T1000+0200">
         &lt;span property="cal:dtstart" content="20070508T1000+0200"&gt;
             May 8th at 10am
             May 8th at 10am
         </span>.
         &lt;/span&gt;.
     </p>
     &lt;/p&gt;
  ...
  ...
     <p class="contactinfo" about="http://example.org/staff/jo">
     &lt;p class="contactinfo" about="http://example.org/staff/jo"&gt;
         My name is
         My name is
         <span property="contact:fn">
         &lt;span property="contact:fn"&gt;
             Jo Smith
             Jo Smith
         </span>.
         &lt;/span&gt;.
         I'm a
         I'm a
         <span property="contact:title">
         &lt;span property="contact:title"&gt;
             distinguished web engineer
             distinguished web engineer
         </span>
         &lt;/span&gt;
 
         at
         at
         <a rel="contact:org" href="http://example.org">
         &lt;a rel="contact:org" href="http://example.org"&gt;
             Example.org
             Example.org
         </a>.
         &lt;/a&gt;.
         You can contact me  
         You can contact me  
         <a rel="contact:email" href="mailto:jo@example.org">
         &lt;a rel="contact:email" href="mailto:jo@example.org"&gt;
             via email
             via email
         </a>.
         &lt;/a&gt;.
     </p>
     &lt;/p&gt;
...
  ...





Revision as of 15:11, 23 April 2007

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 15:11, 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 15:11, 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 15:11, 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#">
...
   <p class="cal:Vevent" about="#xtech_conference_talk">
       I'm giving
       <span property="cal:summary">
           a talk at the XTech Conference about web widgets
       </span>,
       on
       <span property="cal:dtstart" content="20070508T1000+0200">
           May 8th at 10am
       </span>.
   </p>
...
   <p class="contactinfo" about="http://example.org/staff/jo">
       My name is
       <span property="contact:fn">
           Jo Smith
       </span>.
       I'm a
       <span property="contact:title">
           distinguished web engineer
       </span>
       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>.
   </p>
 ...


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)