W3C

HTML5 Profiles

W3C Editor's Draft 22 May 2010

This version:
http://html5.digitalbazaar.com/specs/html5-profiles.html
Latest published version:
http://www.w3.org/TR/html5-profiles/
Latest editor's draft:
http://html5.digitalbazaar.com/specs/html5-profiles.html
Previous version:
none
Editor:
Manu Sporny, Digital Bazaar msporny@digitalbazaar.com
Authors:
Manu Sporny, Digital Bazaar msporny@digitalbazaar.com
Julian Reschke, greenbytes, GmbH
Tantek Çelik, Microformats.org

Abstract

This specification defines rules and guidelines for extending the document processing rules for [HTML5] documents. The specification of the profile attribute in this document is designed to correct and supercede the definition of profile in [HTML401] and [XHTML11].

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/.

The latest stable version of the editor's draft of this specification is always available on the W3C CVS server. The latest editor's working copy (which may contain unfinished text in the process of being prepared) is also available.

The W3C HTML Working Group is the W3C working group responsible for this specification's progress along the W3C Recommendation track.

This specification is an extension to the HTML5 language. All normative content in the HTML5 specification, unless specifically overridden by this specification, is intended to be the basis for this specification.

This document was published by the HTML Working Group as an Editor's Draft. If you wish to make comments regarding this document, please send them to public-html@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. Introduction

The profile attribute was introduced in [HTML401] as a means to specifiy the location of one or more metadata profiles. The attribute could contain a space-separated list of tokens or URIs and was primarily designed to extend the way User Agents processed the HTML document. User agents could recognize the URI (without actually retrieving the profile) and perform some activity based on known conventions for that profile. Applications could also dereference the URI and perform some activity based on the definitions within the profile.

The mechanism to use the contents of the profile attribute was not defined in [HTML401]. However, the mechanism on processing the profile attribute was later described by XMDP, [GRDDL], eRDF, [RDFA-CORE], [XHTML-RDFA] and [HTML-RDFA]. The mechanism in each technology defined a set of processing instructions for extracting semantics from attribute values contained in the HTML document.

Specifically, XMDP clarified profile attribute processing, and introduced a profile document format based on XHTML which authors could produce and link to using the [HTML401] profile attribute. GRDDL outlined how one could use the profile attribute to process the document and extract metadata. The languages that included RDFa defined how the profile attribute could be used to pre-declare vocabulary terms and prefix mappings.

While the HTML5 base specification dropped the profile attribute from the HEAD element, the attribute continues to be utilized by a number of structured data communities.

This document is an extension to HTML5 which achieves the following:

2. Conformance

As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.

The key words must, must not, required, should, should not, recommended, may, and optional in this specification are to be interpreted as described in [RFC2119].

3. The Profile Attribute

This specification defines a single attribute and the way in which the values of that attribute are to be interpreted when generating a list of URIs.

profile
a whitespace separated list of one or more URIs, each corresponding to a profile document.

The profile attribute is valid on any element in the document. When processing attribute values, each URI must be processed from left to right. The characters that constitute whitespace are detailed in the [HTML5] specification, under the term space characters.

4. Profile Documents

Profile documents define document metadata extraction instructions and/or vocabulary terms. These instructions and vocabulary terms apply to the current element and all descendant elements.

5. Microformat Profile Document Example

This section is non-normative.

<div profile="http://microformats.org/wiki/hcard" class="vcard">
 <a class="url fn" href="http://tantek.com/">Tantek Çelik</a>
</div>

Would generate the following key-value mapping (in JSON format):

{
   "___type___": "http://microformats.org/wiki/hcard#vcard",
   "http://microformats.org/wiki/hcard#fn": "Tantek Çelik",
   "http://microformats.org/wiki/hcard#url": "http://tantek.com/"
}

6. RDFa Profile Document Example

This section is non-normative.

<div profile="http://microformats.org/vocabs/hcard" typeof="vcard">
 <a rel="url" href="http://manu.sporny.org/" property="fn">Manu Sporny</a>
</div>

Would generate the following triples:

_:subject0 
   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
      <http://microformats.org/vocabs/hcard#vcard> .
_:subject0 
   <http://microformats.org/vocabs/hcard#fn>
      "Manu Sporny" .
_:subject0 
   <http://microformats.org/vocabs/hcard#url>
      <http://manu.sporny.org/> .

Add a way that microdata could use definitions provided by the profile attribute without having to use full URLs in itemtype attribute values for example.

Add an example using the profile attribute to introduce/define/scope a vocabulary and then use in microdata, microformats, and RDFa markup simultaneously, as a demonstration that they can be used on the same data in a complementary overlapping fashion. Not sure of the utility of doing this but demonstrating that they can be used in the same document or even on the same element may help both alleviate incompatibility concerns, and how to use shared vocabularies across multiple syntaxes.

7. The Profile Attribute in Other Languages

This section is non-normative.

The profile attribute as defined in this specification can be applied to other markup languages (including previous versions of HTML and XHTML) as follows.

Add an informative profile attribute processing model for other languages.

Add examples of HTML4, XHTML1, SVG, and other markup languages that have a class attribute.

Add examples of Atom, and other markup languages that have a rel attribute.

Add note/reference how other markup languages could be extended with both the profile attribute and with one or more of : microformats (by adding class and rel attributes), RDFa (by adding property, rel, and about attributes), and microdata (by adding itemscope, itemtype, itemprop, itemid, and itemref attributes).

8. HTML 4.01 Errata

This section is non-normative.

The HTML4 recommendation is inconsistent in its description of the profile attribute:

The DTD specifies %URI;, which just expands to CDATA. On the other hand, the prose explains that

This attribute specifies the location of one or more meta data profiles, separated by white space. For future extensions, user agents should consider the value to be a list even though this specification only considers the first URI to be significant. Profiles are discussed below in the section on meta data.

Since the publication of HTML 4.01, a number of meta data profiles have been defined, and many of them can be used in the same document. While the profile attribute does not help in discovering which profile applies to which part of the document, it does allow declaring which profiles are in use, potentially triggering extended behavior in recipients.

This erratum restores consistency in HTML 4.01, explicitly allowing multiple URIs in a single profile attribute.

Do we need to include XMDP interpretations of HTML 4.01 / XHTML 1.0?

Section 6.4 - URIs

After

URIs are represented in the DTD by the parameter entity %URI;.

add

A set of whitespace-separated URIs are represented by the parameter entity %URIlist;.

Section 7.4.1 - The HEAD element

Replace

 
      profile = uri [CT]
      

with

 
      profile = urilist [CT]
      

(just replacing "uri" by "urilist", but not changing the link target)

Replace

 
      profile     %URI;          #IMPLIED  -- named dictionary of meta info --
      

with

 
      profile     %URIlist;      #IMPLIED  -- list of named meta info dictionaries, whitespace separated --
      

Update the attribute index accordingly.

Replace

This attribute specifies the location of one or more meta data profiles, separated by white space. For future extensions, user agents should consider the value to be a list even though this specification only considers the first URI to be significant. Profiles are discussed below in the section on meta data.

with

This attribute specifies the location of one or more meta data profiles, separated by white space. In case of ambiguities, profiles that appear later in the attribute value should be considered more significant. Profiles are discussed below in the section on meta data.

Section 7.4.4 - Meta Data Profiles

Replace

The profile attribute of the HEAD specifies the location of a meta data profile. The value of the profile attribute is a URI. User agents may use this URI in two ways:

with

The profile attribute of the HEAD specifies a set of locations of meta data profiles. The value of the profile attribute is a whitespace-separated list of URIs. User agents may use these URIs in two ways:

Section 21 - Document Type Definition

Note: the changes below apply both to the copy of the DTD in the HTML 4.01 spec, and the actual DTD files.

After the definition for URI, insert:

 
    <!ENTITY % URIlist "CDATA"
        -- whitespace-separated list of Uniform Resource Identifiers,
           see [URI]
        -->
      

Replace the following definition:

 
    <!ATTLIST HEAD
      %i18n;                               -- lang, dir --
      profile     %URI;          #IMPLIED  -- named dictionary of meta info --
      >
      

with

 
    <!ATTLIST HEAD
      %i18n;                               -- lang, dir --
      profile     %URIlist;      #IMPLIED  -- list of named meta info dictionaries, whitespace separated --
      >
      

A. References

A.1 Normative references

[HTML5]
Ian Hickson; David Hyatt. HTML 5. 4 March 2010. W3C Working Draft. (Work in progress.) URL: http://www.w3.org/TR/2010/WD-html5-20100304/
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. Internet RFC 2119. URL: http://www.ietf.org/rfc/rfc2119.txt

A.2 Informative references

[GRDDL]
Dan Connolly. Gleaning Resource Descriptions from Dialects of Languages (GRDDL). 11 September 2007. W3C Recommendation. URL: http://www.w3.org/TR/2007/REC-grddl-20070911
[HTML-RDFA]
Manu Sporny; et al. HTML+RDFa 04 March 2010. W3C Working Draft. URL: http://www.w3.org/TR/rdfa-in-html/
[HTML401]
David Raggett; Ian Jacobs; Arnaud Le Hors. HTML 4.01 Specification. 24 December 1999. W3C Recommendation. URL: http://www.w3.org/TR/1999/REC-html401-19991224
[RDFA-CORE]
Shane McCarron; et al. RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.22 April 2010. W3C Working Draft. URL: http://www.w3.org/TR/2010/WD-rdfa-core-20100422
[XHTML-RDFA]
Shane McCarron; et. al. XHTML+RDFa 1.1. 22 April 2010. W3C Working Draft. URL: http://www.w3.org/TR/WD-xhtml-rdfa-20100422
[XHTML11]
Murray Altheim; Shane McCarron. XHTML™ 1.1 - Module-based XHTML. 31 May 2001. W3C Recommendation. URL: http://www.w3.org/TR/2001/REC-xhtml11-20010531