Feature #24059
closedAdd basic support for RDFa in core (semantic web)
0%
Description
A first but important step towards the vision of Semantic Web aka Web 3.0 is to add RDFa (embedded RDF triples) to the FE output. This is the upcoming new standard and will IMO replace Microformats entirely.
Google, Yahoo, Facebook et al. already support RDFa. To support RDFa will become essential for SEO. To enable this important feature we have
1. to add a new DOCTYPE to the already existing selection:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
2. to add xml namespaces (xmlns) preferably to head tag.
I propose to be able to say in TS setup
config.doctype = xhtml+rdfa
config.namespaces {
dc = http://purl.org/dc/elements/1.1/
foaf = http://xmlns.com/foaf/0.1/
sioc = http://rdfs.org/sioc/ns#
}
to get
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:sioc="http://rdfs.org/sioc/ns#"
xml:lang="en" lang="en">
The attached patch implements this feature. It does not add any RDFa to the content but enables an Extension to do so.
Some additional information about RDFa
RDFa primer: http://www.w3.org/TR/xhtml-rdfa-primer/
RDFa examples: http://www.google.com/support/webmasters/bin/answer.py?answer=146898
RDFa syntax: http://www.w3.org/TR/rdfa-syntax/
(issue imported from #M16395)
Files
Updated by Jochen Rau about 14 years ago
I have added an improved patch (feature_16395_v2.diff). Changes:
1) The value of the config.doctype changed from xhtml+rdfa to xhtml+rdfa_10 to distinguish it from the upcoming XHTML+RDFa 1.1 standard (xhtml+rdfa_11).
2) The lang attribute is added to HTML5 as well (bug in trunk)
3) The namespaces are added to HTML5 as well.