Abstract

This document is not finished. Due to the lack of time, the RDF Web Applications Working Group was unable to complete work on this document before the end of their charter. At the time of publication of this document, it was not known whether W3C will continue this work on the Recommendation track in another Working Group. While a significant amount of design work went into this document, at present there is only one known implementation of the specification. A number of design issues have not been completely resolved. Developers wishing to implement this API should be aware of incomplete nature of the specification.

RDFa [ RDFA-CORE ] enables authors to publish structured information that is both human- and machine-readable. Concepts that have traditionally been difficult for machines to detect, like people, places, events, music, movies, and recipes, are now easily marked up in Web documents. While publishing this data is vital to the growth of Linked Data, using the information to improve the collective utility of the Web for humankind is the true goal. To accomplish this goal, it must be simple for Web developers to extract and utilize structured information from a Web document. This document details such a mechanism; an RDFa Application Programming Interface (RDFa API) that allows simple extraction and usage of structured information from a Web document.

How to Read this Document This section is non-normative. This document is a detailed specification for an RDFa API. The document is primarily intended for the following audiences: User Agent developers that are providing a mechanism to programatically extract RDF data from RDFa in a host language such as XHTML+RDFa [ XHTML-RDFA ], HTML+RDFa [ HTML-RDFA ] or SVG Tiny 1.2 [ SVGTINY12 ],

], HTML+RDFa [ ] or SVG Tiny 1.2 [ ], DOM tool developers that want to provide a mechanism for extracting RDFa content via programming languages such as ECMAScript, Python, Ruby, or Perl, and

Developers that want to understand the inner workings and design criteria for the RDFa API. For those looking for an introduction to the use of RDFa, or some real-world examples, please consult the RDFa Primer [ RDFA-PRIMER ]. If you are not familiar with RDF, you should read about the Resource Description Framework (RDF) [ RDF-CONCEPTS ] before reading this document. The [ RDF-CONCEPTS ] document outlines the core data model that is used by RDFa to express information. If you are not familiar with RDFa, you should read and understand the [ RDFA-CORE ] specification. It describes how data is encoded in host languages using RDFa. A solid understanding of concepts in RDFa Core will inevitably help you understand how the RDFa API works in concert with how the data is expressed in a host language. If you are not familiar with the RDF API, you should read about the Resource Description Framework Application Programming Interface [ RDF-API ] which is the base specification for this document. The [ RDF-API ] specification outlines fundamental programming concepts for working with Web-based data. If you are a Web developer and are already familiar with RDF and RDFa, and you want to programatically extract RDFa content from documents, then you will find the Concept Diagram and Developing with the API sections of most interest. It contains a handful of ECMAScript examples on how to use the RDFa API. Readers who are not familiar with the Terse RDF Triple Language [ TURTLE ] may want to read the specification in order to understand the short-hand RDF notation used in some of the examples. This document uses the Web Interface Definition Language [ WEBIDL ] to specify all language bindings. If you intend to implement the RDFa API you should be familiar with the Web IDL language [ WEBIDL ]. Examples may contain references to existing vocabularies and use abbreviations in CURIEs and source code. The following is a list of all vocabularies and their abbreviations, as used in this document: The RDF vocabulary (abbreviation: rdf , e.g., rdf:type )

, e.g., ) The XSD vocabulary (abbreviation: xsd , e.g., xsd:integer )

, e.g., ) The RDF schema vocabulary (abbreviation: rdfs , e.g., rdfs:label )

, e.g., ) The Friend-Of-A-Friend vocabulary (abbreviation: foaf , e.g., foaf:name )