World Library  
Flag as Inappropriate
Email this Article
 

RDFa

RDF in Attributes
Current status Published
Year started 2004
Editors Ben Adida, Mark Birbeck
Base standards RDF
Related standards RDF Schema, OWL
Domain Semantic Web
Abbreviation RDFa
Website www.w3.org/TR/xhtml-rdfa-primer/

RDFa (or Resource Description Framework in Attributes[1]) is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML and various XML-based document types for embedding rich metadata within Web documents. The RDF data-model mapping enables its use for embedding RDF subject-predicate-object expressions within XHTML documents. It also enables the extraction of RDF model triples by compliant user agents.

The RDFa community runs a wiki website to host tools, examples, and tutorials.[2]

Contents

  • History 1
  • Essence 2
  • Benefits 3
  • Examples 4
    • XHTML+RDFa 1.0 example 4.1
    • HTML 5 + RDFa 1.1 example 4.2
  • Web-based RDFa editors 5
  • Desktop RDFa editors 6
  • See also 7
  • References 8
  • External links 9

History

RDFa was first proposed by Mark Birbeck in the form of a W3C note entitled XHTML and RDF,[3] which was then presented to the Semantic Web Interest Group at the W3C's 2004 Technical Plenary.[3] Later that year the work became part of the sixth public Working Draft of XHTML 2.0.[4][5] Although it is generally assumed that RDFa was originally intended only for XHTML 2, in fact the purpose of RDFa was always to provide a way to add a metadata to any XML-based language. Indeed, one of the earliest documents bearing the RDF/A Syntax name has the sub-title A collection of attributes for layering RDF on XML languages.[6] The document was written by Mark Birbeck and Steven Pemberton, and was made available for discussion on October 11, 2004.

In April 2007 the XHTML 2 Working Group produced a module to support RDF annotation within the XHTML 1 family.[7] As an example, it included an extended version of XHTML 1.1 dubbed XHTML+RDFa 1.0. Although described as not representing an intended direction in terms of a formal markup language from the W3C, limited use of the XHTML+RDFa 1.0 DTD did subsequently appear on the public Web.[8]

October 2007 saw the first public Working Draft of a document entitled RDFa in XHTML: Syntax and Processing.[9] This superseded and expanded upon the April draft; it contained rules for creating an RDFa parser, as well as guidelines for organizations wishing to make practical use of the technology.

In October 2008 RDFa 1.0 reached recommendation status.[10]

RDFa 1.1 reached recommendation status in June 2012.[11] It differs from RDFa 1.0 in that it no longer relies on the XML-specific namespace mechanism. Therefore, it is possible to use RDFa 1.1 with non-XML document types such as HTML 4 or HTML 5. Details can be found in an appendix to HTML 5.[12]

An additional RDFa Primer document was last updated in June 2012.[13] (The first public Working Draft dates back to March 2006.)

Essence

The essence of RDFa is to provide a set of attributes that can be used to carry metadata in an XML language (hence the 'a' in RDFa).

These attributes are:

  • about – a URI or CURIE specifying the resource the metadata is about
  • rel and rev – specifying a relationship and reverse-relationship with another resource, respectively
  • src, href and resource – specifying the partner resource
  • property – specifying a property for the content of an element or the partner resource
  • content – optional attribute that overrides the content of the element when using the property attribute
  • datatype – optional attribute that specifies the datatype of text specified for use with the property attribute
  • typeof – optional attribute that specifies the RDF type(s) of the subject or the partner resource (the resource that the metadata is about).

Benefits

There are five "principles of interoperable metadata" met by RDFa.[14]

  • Publisher Independence – each site can use its own standards
  • Data Reuse – data are not duplicated. Separate XML and HTML sections are not required for the same content.
  • Self Containment – the HTML and the RDF are separated
  • Schema Modularity – the attributes are reusable
  • Evolvability – additional fields can be added and XML transforms can extract the semantics of the data from an XHTML file

Additionally RDFa may benefit web accessibility as more information is available to assistive technology.[15]

Examples

The following is an example of adding Dublin Core metadata to an XML element in an XHTML file. Dublin Core data elements are data typically added to a book or article (title, author, subject etc.)

Wikinomics Don Tapscott 2006-10-01

Moreover, RDFa allows the passages and words within a text to be associated with semantic markup:

In his latest book Wikinomics, Don Tapscott explains deep changes in technology, demographics and business. The book is due to be published in October 2006.

XHTML+RDFa 1.0 example

The following is an example of a complete XHTML+RDFa 1.0 document. It uses Dublin Core and FOAF, an ontology for describing people and their relationships with other people and things:




  
    John's Home Page
    
    
    
  
  
    

John's Home Page

My name is John D and I like Einstürzende Neubauten.

My favorite book is the inspiring Weaving the Web by Tim Berners-Lee.

In the example above, the document URI can be seen as representing an HTML document, but the document URI plus the "#me" string http://example.org/john-d/#me represents the actual person, as distinct from a document about them. The foaf:primaryTopic in the header tells us a URI of the person the document is about. The foaf:nick property (in the first span element) contains a nickname for this person, and the dc:creator property (in the meta element) tells us who created the document. The hyperlink to the Einstürzende Neubauten website contains rel="foaf:interest", suggesting that John Doe is interested in this band. The URI of their website is a resource.

The foaf:interest inside the second p element is referring to a book by ISBN number. The resource attribute defines a resource in a similar way to the href attribute, but without defining a hyperlink. Further into the paragraph, a span element containing an about attribute defines the book as another resource to specify metadata about. The book title and author are defined within the contents of this tag using the dc:title and dc:creator properties.

Here are the same triples when the above document is automatically converted to RDF/XML:



  
    Jonathan Doe
    
      
        John D
        
        
          
            Tim Berners-Lee
            Weaving the Web
          
        
      
    
  

HTML 5 + RDFa 1.1 example

The above example can be expressed without XML namespaces in HTML 5:


  
    John's Home Page
    
    
    
    
  
  
    

John's Home Page

My name is John D and I like Einstürzende Neubauten.

My favorite book is the inspiring Weaving the Web by Tim Berners-Lee.

Note how the prefix foaf is still used without declaration. RDFa 1.1 automatically includes prefixes for popular vocabularies such as FOAF.[16]

Web-based RDFa editors

There are already a few RDFa editors available online:

  • RDFaCE (RDFa Content Editor) is a WYSIWYM editor based on TinyMCE to support RDFa content authoring. It supports manual and semi-automatic generation of RDFa with the support of annotation services such as DBpedia Spotlight, OpenCalais, Alchemy API, among others.[17] RDFaCE-Lite is a version of RDFaCE also supporting Microdata and available as a WordPress plugin.[18]

Desktop RDFa editors

  • AutôMeta is an environment for semi-automatic (or automatic) annotation of documents for publishing on the Web using RDFa. It also includes a RDFa extraction tool to provide the user with a view of the annotated triples. It is available in both CLI and GUI interfaces.[19]

See also

  • Microformats, a simplified approach to semantically annotate data in web pages
  • Open Graph protocol, a way to use RDFa to integrate web pages into the Facebook social graph
  • Microdata - another approach at embedding semantics in HTML using additional attributes
  • eRDF, an alternative to RDFa
  • GRDDL, a way to extract (annotated) data out of XHTML and XML documents and transform it into an RDF graph
  • Schema.org, search-engine supported schemas for structured data markup on web pages that can be expressed as RDFa

References

  1. ^ "XHTML RDFa Primer". W3.org. 2013. Retrieved 14 June 2013. RDFa is defined as "Resource Description Framework in Attributes".
  2. ^ RDFa community Wiki
  3. ^ a b "XHTML and RDF W3C Note 14 February 2004".  
  4. ^ "XHTML 2.0 W3C Working Draft 22 July 2004, 19. XHTML Metainformation Attributes Module".  
  5. ^ "XML and Semantic Web W3C Standards Timeline". 
  6. ^ "RDF/A Syntax: A collection of attributes for layering RDF on XML languages". 2004-10-11. Retrieved 2009-05-14. 
  7. ^ "XHTML RDFa Modules, Modules to support RDF annotation of elements, W3C Editor's Draft 2 April 2007".  
  8. ^ For examples of this, see: http://www.joost.com/09400ax http://weborganics.co.uk/files/hAudio-RDFa.xhtml
  9. ^ "RDFa in XHTML: Syntax and Processing, A collection of attributes and processing rules for extending XHTML to support RDF, W3C Working Draft 18 October 2007".  
  10. ^ "RDFa in XHTML: Syntax and Processing, A collection of attributes and processing rules for extending XHTML to support RDF, W3C Recommendation 14 October 2008".  
  11. ^ "RDFa Core 1.1 - Syntax and processing rules for embedding RDF through attributes".  
  12. ^ "HTML+RDFa 1.1 - Support for RDFa in HTML4 and HTML5".  
  13. ^ "RDFa 1.1 Primer - Rich Structured Data Markup for Web Documents".  
  14. ^ Building Interoperable Web Metadata
  15. ^ RDFa – Implications for Accessibility
  16. ^ "RDFa Core Initial Context - Vocabulary Prefixes".  
  17. ^ RDFaCE home page
  18. ^ RDFaCE WordPress Plugin
  19. ^ AutôMeta Project Page

External links

  • RDFa Primer
  • Tutorial
  • RDFa Use Cases: Scenarios for Embedding RDF in HTML
  • RDFa Syntax
  • RDFa Lite 1.1
  • RDFa Test Suite
  • RDFa FAQ
  • hGRDDL
  • RDFa – Implications for Accessibility
  • Mark Birbeck presenting RDFa at Google in May 2008
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 



Copyright © World Library Foundation. All rights reserved. eBooks from World eBook Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.