RDFa Vocabularies

Unofficial Editor's Draft 11 January 2010

This Version:
http://rdfa.digitalbazaar.com/specs/rdfa-vocab-20100111.html
Latest Published Version:
http://www.w3.org/TR/rdfa-syntax/
Latest Editor's Draft:
http://rdfa.digitalbazaar.com/specs/rdfa-vocab-20100111.html
Previous version:
none
Editor:
Manu Sporny, Digital Bazaar msporny@digitalbazaar.com

Abstract

This document outlines an extension to the the syntax and processing rules that would allow the list of reserved words recognized by RDFa to be extended. The goal of this mechanism is to make authoring RDFa easier for web developers and designers.

For those looking for an introduction to the use of RDFa and some real-world examples, please consult the RDFa Primer.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

A sample test harness is available. This set of tests is not intended to be exhaustive. Users may find the tests to be useful examples of RDFa usage. An implementation report lists several implementations of this specification tested during the Candidate Recommendation period. A community-maintained Wiki page includes subsequent updates.

This document was published by the RDFa Working Group as an Editor's Draft. If you wish to make comments regarding this document, please send them to public-rdf-in-xhtml-tf@w3.org@w3.org (subscribe, archives). All feedback is welcome.

Publication as a Editor's Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1. Syntax Modifications

This section covers additional syntax that should be added to the RDFa [RDFA-SYNTAX] language.

1.1 The vocab attribute

The vocab attribute provides a mechanism to load one or more external RDFa vocabularies. The attribute's value should contain one or more space-separated URLs. Each URL, when dereferenced, should provide a document marked up with the RDFa Vocabulary that specifies modifications to the current [evaluation context]. The document that is returned should be determined via content negotiation.

2. The RDFa Vocabulary

The RDFa Vocabulary is used to modify RDFa processing behavior.

The RDFa Vocabulary URL is http://www.w3.org/2010/vocabs/rdfa.

The RDFa Vocabulary contains the following RDF content (shown in N-Triples format):

 <http://www.w3.org/2010/vocabs/rdfa#term>
    <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
       <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
 <http://www.w3.org/2010/vocabs/rdfa#term>
    <http://www.w3.org/2000/01/rdf-schema#label>
       "term" .
 <http://www.w3.org/2010/vocabs/rdfa#term>
    <http://www.w3.org/2000/01/rdf-schema#comment>
       "Specifies the short-form term for a URL for use in CURIE expansion." .
      

3. Processing Modifications

This section covers additions to the RDFa processing rules.

3.1 Processing Sequence Modifications

The vocab attribute is processed after Step #1, but before Step #2 in Section 5.5: Sequence of [RDFA-SYNTAX]. In other words, the vocab attribute is always processed before xmlns: declarations are processed.

For every triple in each vocabulary document specified via the vocab attribute that contains rdfa:term as a predicate, create a mapping from the object literal to the subject and add it to the [local list of URI mappings]. If the object is not a plain literal, a mapping must not be created.

URLs specified via the vocab attribute value are processed in order, from left to right. Any mapping conflicts, where an RDFa term is defined twice, are resolved by ensuring that the last mapping to be made is the one that is used by any process that utilizes the [local list of URI mappings]. This also means that mapping conflicts between URI mappings created via vocab and URI mappings created via xmlns: are resolved by processing all vocab attributes first and then processing all xmlns: attributes. The last duplicate URI mapping to be produced is always the value that will be stored in the [local list of URI mappings].

3.2 CURIE Processing

CURIE processing changes slightly to allow colon-less and reference-less CURIEs. Therefore, a prefix-only CURIE, lacking both the colon and the reference, is allowed if a mapping for the prefix value exists in the [local list of URI mappings].

4. Example

To illustrate how the vocab attribute is intended to be used, the following examples are provided.

Given the following RDFa Vocabulary document at http://example.org/vocabs.html:

<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:rdfa="http://www.w3.org/2010/vocabs/rdfa">
  <head>
    <title>Example RDFa Vocabulary</title>
  </head>
  <body>
    <p>
      This is an example RDFa vocabulary that makes it easier to 
      use the foaf:name and foaf:homepage terms.
    </p>

    <p about="http://xmlns.com/foaf/0.1/name">
       The <code property="rdfa:term">name</code> term maps to foaf:name.
    </p>

    <p about="http://xmlns.com/foaf/0.1/homepage">
       The <code property="rdfa:term">homepage</code> term maps to foaf:homepage.
    </p>
  </body>
</html>
      

and the following HTML markup:

<div vocab="http://example.org/vocabs.html" about="#me">
   My name is <span property="name">John Doe</span> and my blog is called
   <a rel="homepage" href="http://example.org/blog/">Understanding Semantics</a>.
</div>
      

The following triples should be generated:

 <#me>
    <http://xmlns.com/foaf/0.1/name>
       "John Doe" .
 <#me>
    <http://xmlns.com/foaf/0.1/homepage>
       <http://example.org/blog/> .
      

5. Issues

The primary issues that make this approach problematic include:

A. References

A.1 Normative references

[RDFA-SYNTAX]
Steven Pemberton; et al. RDFa in XHTML: Syntax and Processing. 14 October 2008. W3C Recommendation. URL: http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014

A.2 Informative references

No informative references.