RDFa
RDFa (Resource Description Framework – in – attributes) je doporučení W3C; jedná se o rozšíření XHTML.
info
editovat- w:en: RDFa
- W3C
- (2004-10-11): RDF/A Syntax – A collection of attributes for layering RDF on XML languages
- (2007-10-18): RDFa in XHTML: Syntax and Processing – A collection of attributes and processing rules for extending XHTML to support RDF (working draft)
- (2008-06-20): RDFa Primer – Bridging the Human and Data Webs (working draft)
- (2010-06-24): HTML+RDFa 1.1 – Support for RDFa in HTML4 and HTML5 (working draft)
Jak to vypadá
editovatNejlé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.