| XHTML+RDFa | |
|---|---|
| Filename extension | .xhtml, .xht, .xml, .html, .htm |
| Internet media type | application/xhtml+xml |
| Developed by | World Wide Web Consortium |
| Initial release | 14 October 2008 (2008-10-14) |
| Latest release | 1.1 3 August 2010; 15 years ago (2010-08-03) |
| Type of format | Host language |
| Extended from | XML,HTML |
| Standard | 1.0 (Recommendation), 1.1 (Recommendation) |
| HTML |
|---|
| HTML and variants |
| HTML elements and attributes |
| Editing |
| Character encodings and language |
| Document and browser models |
| Client-side scripting and APIs |
| Graphics and Web3D technology |
| Comparisons |
XHTML+RDFa (Extensible Hypertext Markup Language + Resource Description Framework in attributes) is an extended version of theXHTMLmarkup language for supportingRDF through a collection of attributes and processing rules in the form ofwell-formedXML documents. XHTML+RDFa is one of the techniques used to developSemantic Web content by embedding rich semantic markup.Version 1.1 of the language is a superset ofXHTML 1.1, integrating the attributes according toRDFa Core 1.1. In other words, it is anRDFa support throughXHTML Modularization.
RDFa inXHTML version 1.0 became aWorld Wide Web Consortium (W3C)Recommendation on 14 October 2008.[1][2]
The current recommendation isRDFa+XHTML version 1.1, which became a W3C Recommendation on 7 June 2012[3] and was updated with a ”Second Edition” on 22 August 2013[4] and a ”Third Edition” on 17 March 2015.[5]
Version 1.1 is based onXHTML™ 1.1 - Module-based XHTML - Second Edition. Version 1.0 was based on the first edition.
Conventional Web documents contain large amounts of structured data that can be rendered inweb browsers. This approach works fine for publishing purposes, however, a large amount of data stored inWeb documents cannot be processed this way. XHTML+RDFa can providemachine-readablemetadata within themarkup code which makes additional user functionalities available. Most important of all, actions can be performed automatically that enables up-to-date publishing, structured search and sharing.[6]RDFa can serve as a bridge between the "human and data webs".[7]The potential in web documents enriched with RDFa is increasing since major search engines begin to process them while indexing. Yahoo indexesRDFa and microformats since 2008 and Google since 2009.[8]TheRDFa attribute specifications make it possible to describe structured data in anymarkup language. TheRDFa markup in XHTML+RDFa reuses themarkup code, thus eliminating the need for unnecessary duplications.XHTML+RDFa is not widely distributed yet, probably due to the lack of support in authoring tools andcontent management systems.[9] However, there is good tendency.Drupal 7, for example, supportsRDFa.[10]Since the “a” in RDFa stands for attributes, it is straightforward to useCSS selectors to style the code.[11]
The combination ofXHTML 1.1 andRDFa modules is claimed to be an examplemarkup language. The Document Type Definition (DTD) is published at theW3C website.[12]
According to thedocument type declaration, the identifiers of an XHTML+RDFa document should look like the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
An example XHTML+RDFa document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd"><htmlversion="XHTML+RDFa 1.1"xmlns="http://www.w3.org/1999/xhtml"xml:lang="en"lang="en"><head><title>XHTML+RDFadocumentexample</title></head><body>...</body></html>
TheRDFametadata is embedded as anXHTML attribute of the document element, generally theXHTML tag. The annotation syntax provided by RDFa can be used to expressRDF statements inXHTML documents.[13]
XHTML+RDFa documents can be validated individually online at theW3C Markup Validation Service or together withCSS andRSS atW3C Unicorn. The validity of XHTML+RDFa documents can be indicated by the XHTML+RDFaconformance icons ofW3C .
XHTML syntax, additional namespaces and semantic markup.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd"><htmlversion="XHTML+RDFa 1.1"xmlns="http://www.w3.org/1999/xhtml"xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#"xmlns:foaf="http://xmlns.com/foaf/0.1/"xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"xmlns:xsd="http://www.w3.org/2001/XMLSchema#"xml:lang="en"lang="en"><head><title>XHTML+RDFaexample</title><metahttp-equiv="Content-Type"content="application/xhtml+xml; charset=utf-8"/><metahttp-equiv="Content-Style-Type"content="text/css"/><metaname="content-language"content="en"/><metaname="robots"content="index, follow"/><linkrel="schema.DC"href="http://purl.org/dc/elements/1.1/"/><linkrel="schema.DCTERMS"href="http://purl.org/dc/terms/"/><linkrel="alternate"type="application/rss+xml"title="Feed channel of XHTML+RDFa example page"href="http://www.example.com/rss.xml"/><metaname="DC.title"content="XHTML+RDFa example"/><metaname="DC.subject"content="XHTML+RDFa, semantic web"/><metaname="DC.description"content="Example for Extensible Hypertext Markup Language + Resource Description Framework – in – attributes."/><metaname="DC.format"content="application/xhtml+xml"/><metaname="DC.language"content="en"/><linkrel="shortcut icon"href="favicon.ico"/><linkrel="stylesheet"type="text/css"href="main.css"title="main styles"/><linkrel="foaf:primaryTopic"type="application/rdf+xml"title="FOAF"href="http://www.example.com/metadata/foaf.rdf"/><scripttype="text/javascript"src="js/click.js"></script></head><body><divclass="content"><p><spanproperty="foaf:name">JerrySmith</span><br/><i>Seniordeveloper,QA</i><br/><atitle="More about me"rel="rdfs:seeAlso"href="about.htm">More...</a></p><prel="contact:address">93RoseAve<br/><aproperty="contact:city"rel="rdfs:seeAlso"title="Adelaide on Wikipedia"resource="http://dbpedia.org/resource/Adelaide"href="http://en.wikipedia.org/wiki/Adelaide">Adelaide</a></p><p><spanrel="foaf:phone"resource="tel:+6112345678">+6112/345-678</span></p></div></body></html>