RDFa

Z Wikiverzity

RDFa (Resource Description Framework – in – attributes) je doporučení W3C; jedná se o rozšíření XHTML.

info[editovat]

Jak to vypadá[editovat]

Nejlépe je se podívat na nějaký zdroj, který RDFa obsahuje – například se podívat na Sémantické extense MediaWiki/Tutoriál. Tam jsme si na http://semantika.referata.com/wiki/Petr vytvořili stránku Petra, dole vidíme RDF fakta:

Predikát Objekt
Number 4
birthDate 1953
birthPlace Praha
father Stanislav
firstName Petr
marriageDate 1976
mother Věra
son Dalibor
son Vít
son Slávek
son Matěj
wife Alena

Jak jsou tato fakta reprezentována pomocí RDFa? Podíváme na HTML kód stránky a budme hledat tagy <span>:

<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/Number/4" title="Special:SearchByProperty/Number/4">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/birthDate/1953" title="Special:SearchByProperty/birthDate/1953">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/birthPlace/Praha" title="Special:SearchByProperty/birthPlace/Praha">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/father/Stanislav" title="Special:SearchByProperty/father/Stanislav">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/firstName/Petr" title="Special:SearchByProperty/firstName/Petr">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/marriageDate/1976" title="Special:SearchByProperty/marriageDate/1976">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/mother/V%C4%9Bra" title="Special:SearchByProperty/mother/Věra">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/son/Dalibor" title="Special:SearchByProperty/son/Dalibor">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/son/V%C3%ADt" title="Special:SearchByProperty/son/Vít">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/son/Sl%C3%A1vek" title="Special:SearchByProperty/son/Slávek">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/son/Mat%C4%9Bj" title="Special:SearchByProperty/son/Matěj">+</a></span>
<span class="smwsearch"><a href="/wiki/Special:SearchByProperty/wife/Alena" title="Special:SearchByProperty/wife/Alena">+</a></span>

Tak to jsou právě přesně ty tagy RDFa.

Odkazy[editovat]