views:

80

answers:

3

In some sites on web I noticed they are using this doctype. What is this doctype and what is the benefit of this Doctype XHTML+RDFa?

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.0//EN' 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd'&gt;
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:v="http://rdf.data-vocabulary.org/#" xml:lang='en' dir='ltr'>
 <head profile="http://purl.org/uF/2008/03/"&gt;
A: 

See the spec: http://www.w3.org/TR/rdfa-syntax/

RDF/XML [RDF-SYNTAX] provides sufficient flexibility to represent all of the abstract concepts in RDF [RDF-CONCEPTS]. However, it presents a number of challenges; first it is difficult or impossible to validate documents that contain RDF/XML using XML Schemas or DTDs, which therefore makes it difficult to import RDF/XML into other markup languages.

Robert
Hmm I also found this article "Serving XHTML+RDFa properly isn't really possible" http://rayofsolaris.net/blog/2009/serving-xhtml-rdfa but i saw some which are valid in W3C validator. "This document was successfully checked as XHTML + RDFa!"
metal-gear-solid
I'd trust the w3.org spec over some random blog any day. It says it's difficult/impossible to validate, so the blog post probably has some truth to it, but it is possible.
Robert
A: 

RDF basically allows the page to be annotated with machine-readable markup. This is a concept known as "semantic web" or "linked data" (see this Ted Talk). The use of machine-readable formats enables all sorts of possibilities by enhancing the amount and quality of data that are available to applications.

Michael Aaron Safyan
Is it better than XHTML 1.0 Strict? What is the difference between making site with XHTML 1.0 Strict and XHTML+RDFa?
metal-gear-solid
You would use XHTML+RDFa in order to gain access to the RDF features.
Michael Aaron Safyan
What are RDF features which can be useful for any site?
metal-gear-solid
What's with the downvote? If the answer is wrong or inaccurate, then downvote, but if you just don't like it or you don't find it complete enough, then simply don't upvote.
Michael Aaron Safyan
+1  A: 

Basically RDFa is 'Rich snippets and structured markup', it'll allow crawlers to understand the content on your page.

Google explains it best: http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=146898

Sounds like Rich Snippets will be the future of SEO in enough sites start to use them.

Google also has built a testing tool for reading Rich Snippets: http://www.google.com/webmasters/tools/richsnippets

Here's a list of sites already using RDFa: http://rdfa.info/wiki/Examples-in-the-wild

Mikey1980
@Mikey1980 - Is it similar to MIcroformats?
metal-gear-solid
@metal-gear-solid ya just different syntax, not sure what the benefits are vs RDFa other than W3 seems to been giving it more attention
Mikey1980