RDFA

From ActiveArchives

Jump to: navigation, search

RDFA is a means of encoding RDF data mixed into HyperText HTML.

http://www.w3.org/TR/xhtml-rdfa-primer/


Example of encoded RDF in HTML using RDFA.

<div class="about_this_review">
    <h2 property="dc:title" class="title">Vaste waarde, grote risico's</h2>
    <div class="authors">
        <a rel="dc:creator" href="/tags/Pieter_T%27Jonck">Pieter T&#39;Jonck</a>
    </div>
 
    <div class="publications">
        <a rel="dc:publisher" href="/tags/De_Tijd">De Tijd</a>
    </div>
    <div class="pubdata">
        <span property="dc:date" content="2002-10-09" datatype="xsd:date">Oct. 9, 2002</span> <span class="language" property="dc:language">Dutch</span>
    </div>
</div>
 
<ul>
<li><a href="/tags/Lilja" rel="sarma:org">Lilja</a></li>
<li rel="sarma:org">
    <span about="http://sarma.be/tags/TAG" typeof="sarma:tag">
        <span property="sarma:tagname">Tag</span>
    </span>
</li>
<div rel="sarma:performance">
    <li><a href="/tags/Weak_Dance%2C_Strong_Questions" typeof="sarma:tag"><span property="sarma:tagname">Weak Dance, Strong Questions</span></a></li>
    <li><a href="/tags/Both_Sitting_Duet" typeof="sarma:tag" property="sarma:tagname">Both Sitting Duet</a></li>
</div>
</ul>

Is parsed as the following RDF (in N3):

<file:///home/murtaugh/wsgi/sarma/test.html> dc:creator <file:///tags/Pieter_T%27Jonck>;
    dc:date "2002-10-09"^^<http://www.w3.org/2001/XMLSchema#date>;
    dc:language "Dutch"@nl;
    dc:publisher <file:///tags/De_Tijd>;
    dc:title "Vaste waarde, grote risico's"@nl;
    sarma:performance <file:///tags/Both_Sitting_Duet>,
        <file:///tags/Weak_Dance%2C_Strong_Questions> .
 
<file:///tags/Both_Sitting_Duet> a <http://sarma.be/terms/tag>;
    sarma:tagname "Both Sitting Duet"@nl .
 
<file:///tags/Weak_Dance%2C_Strong_Questions> a <http://sarma.be/terms/tag>;
    sarma:tagname "Weak Dance, Strong Questions"@nl .
 
<http://sarma.be/tags/TAG> a <http://sarma.be/terms/tag>;
    sarma:tagname "Tag"@nl .
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox