Jump to content

XHTML+RDFa

From Wikipedia, the free encyclopedia
XHTML+RDFa
Filename extension
.xhtml, .xht,
.xml, .html, .htm
Internet media type
application/xhtml+xml
Developed byWorld Wide Web Consortium
Initial release14 October 2008 (2008-10-14)
Latest release
1.1
3 August 2010; 14 years ago (2010-08-03)
Type of formatHost language
Extended fromXML, HTML
Standard1.0 (Recommendation),
1.1 (Recommendation)

XHTML+RDFa (Extensible Hypertext Markup Language + Resource Description Framework in attributes) is an extended version of the XHTML markup language for supporting RDF through a collection of attributes and processing rules in the form of well-formed XML documents. XHTML+RDFa is one of the techniques used to develop Semantic Web content by embedding rich semantic markup. Version 1.1 of the language is a superset of XHTML 1.1, integrating the attributes according to RDFa Core 1.1. In other words, it is an RDFa support through XHTML Modularization.

RDFa in XHTML version 1.0 became a World Wide Web Consortium (W3C) Recommendation on 14 October 2008.[1][2]

The current recommendation is RDFa+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 on XHTML™ 1.1 - Module-based XHTML - Second Edition. Version 1.0 was based on the first edition.

Overview

[edit]

Conventional Web documents contain large amounts of structured data that can be rendered in web browsers. This approach works fine for publishing purposes, however, a large amount of data stored in Web documents cannot be processed this way. XHTML+RDFa can provide machine-readable metadata within the markup 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 indexes RDFa and microformats since 2008 and Google since 2009.[8] The RDFa attribute specifications make it possible to describe structured data in any markup language. The RDFa markup in XHTML+RDFa reuses the markup 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 and content management systems.[9] However, there is good tendency. Drupal 7, for example, supports RDFa.[10] Since the “a” in RDFa stands for attributes, it is straightforward to use CSS selectors to style the code.[11]

Document Type Definition

[edit]

The combination of XHTML 1.1 and RDFa modules is claimed to be an example markup language. The Document Type Definition (DTD) is published at the W3C website.[12]

According to the document 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">
<html version="XHTML+RDFa 1.1" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head>
<title>XHTML+RDFa document example</title>
</head>
<body>
 ...
</body>
</html>

Authoring

[edit]

The RDFa metadata is embedded as an XHTML attribute of the document element, generally the XHTML tag. The annotation syntax provided by RDFa can be used to express RDF statements in XHTML documents.[13]

Validation

[edit]

XHTML+RDFa documents can be validated individually online at the W3C Markup Validation Service or together with CSS and RSS at W3C Unicorn. The validity of XHTML+RDFa documents can be indicated by the XHTML+RDFa conformance icons of W3C .

Examples

[edit]

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">
<html version="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+RDFa example</title>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta name="content-language" content="en" />
    <meta name="robots" content="index, follow" />
    <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
    <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
    <link rel="alternate" type="application/rss+xml" title="Feed channel of XHTML+RDFa example page" href="http://www.example.com/rss.xml" />
    <meta name="DC.title" content="XHTML+RDFa example" />
    <meta name="DC.subject" content="XHTML+RDFa, semantic web" />
    <meta name="DC.description" content="Example for Extensible Hypertext Markup Language + Resource Description Framework – in – attributes." />
    <meta name="DC.format" content="application/xhtml+xml" />
    <meta name="DC.language" content="en" />
    <link rel="shortcut icon" href="favicon.ico" />
    <link  rel="stylesheet" type="text/css" href="main.css" title="main styles" />
    <link rel="foaf:primaryTopic" type="application/rdf+xml" title="FOAF" href="http://www.example.com/metadata/foaf.rdf" />
    <script type="text/javascript" src="js/click.js"></script>
</head>
<body>
<div class="content">
    <p>
        <span property="foaf:name">Jerry Smith</span><br />
        <i>Senior developer, QA</i><br />
        <a title="More about me" rel="rdfs:seeAlso" href="about.htm">More...</a>
    </p>
    <p rel="contact:address">
        93 Rose Ave <br />
        <a property="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>
        <span rel="foaf:phone" resource="tel:+6112345678">+61 12/345-678</span>
    </p>
</div>
</body>
</html>

See also

[edit]

References

[edit]
  1. ^ "RDFa in XHTML: Syntax and Processing. W3C Recommendation 14 October 2008".
  2. ^ Bikakis, Nikos. "XML and Semantic Web W3C Standards Timeline". Semantic Hyper/Multi-Media Adaptation: Schemes and Applications, Springer 2013.
  3. ^ "XHTML+RDFa 1.1. Support for RDFa via XHTML Modularization. W3C Recommendation 07 June 2012".
  4. ^ "XHTML+RDFa 1.1 - Second Edition. Support for RDFa via XHTML Modularization. W3C Recommendation 22 August 2013".
  5. ^ "XHTML+RDFa 1.1 - Third Edition. Support for RDFa via XHTML Modularization. W3C Recommendation 17 March 2015".
  6. ^ Jeffrey T. Pollock (2009). Semantic Web for Dummies. Wisley Publishing, Inc. p. 172. ISBN 978-0-470-39679-7.
  7. ^ Jeffrey Zeldman; Ethan Marcotte (2009). Designing with Web standards (third ed.). New Riders. p. 76. ISBN 978-0-321-61695-1.
  8. ^ Mark Birbeck (2009). "Introduction to RDFa". Retrieved 2010-09-07.
  9. ^ Mark Watson (2009). Scripting Intelligence: Web 3.0 Information, Gathering and Processing. Apress, Inc. p. 347. ISBN 978-1-4302-2351-1.
  10. ^ Ivan Herman; Stéphane Corlosquet; Lin Clark (2010). "Combine the Web of Data and the Web of Documents (RDFa and Drupal 7)". Retrieved 2010-09-07.
  11. ^ Joseph R. Lewis; Meitar Moscovitz (2009). AdvancED CSS. Friendsof. p. 224. ISBN 978-1-4302-1932-3.
  12. ^ "XHTML 1.1 + RDFa DTD". World Wide Web Consortium.
  13. ^ Boualem Benatallah; Fabio Casati; Gerti Kappel, eds. (2010). Proceedings of ICWE 2010, Web Engineering: 10th International Conference. Springer. p. 255. ISBN 978-3-642-13910-9.