Expressing Qualified Dublin Core™ in HTML/XHTML meta and link elements


Expressing Qualified Dublin Core™ in HTML/XHTML meta and link elements

Creator: Andy Powell
UKOLN, University of Bath
Date Issued: 2003-08-11
Is Replaced By:
Latest Version:
Status of Document: This is a superseded DCMI Proposed Recommendation. Please follow the Latest Version link.
Description of Document: This document describes how qualified Dublin Core™ metadata can be encoded in HTML/XHTML <meta> and <link> elements.

## 1. Introduction

This document describes how a qualified Dublin Core™ [DCMI] metadata record can be embedded into an HTML/XHTML Web page using HTML/XHTML elements.

It should be noted that several alternative mechanisms are available for associating a DC record with (or embedding a DC record into) an HTML/XHTML [HTML] resource. These include:

  • Creating a separate RDF/XML [DCRDF, QDCRDF] description and linking to it using the HTML/XHTML element.
  • Creating a separate XML description [DCXML] and linking to it using the HTML/XHTML element.

These alternative approaches are not described here.

1.1 Terminology

This document uses the following terminology:

a resource is anything that has identity. Familiar examples include an electronic document, an image, a service (e.g., "today's weather report for Los Angeles"), and a collection of other resources. Not all resources are network "retrievable"; e.g., human beings, corporations, and bound books in a library can also be considered resources.
a property is a specific aspect, characteristic, attribute, or relation used to describe resources.
a record is some structured metadata about a resource, comprising one or more properties and their associated values.

Note that Dublin Core™ metadata elements are properties(as defined above). Note also that there is potential confusion between the HTML/XHTML usage of the terms 'element' and 'attribute' and the usage of those terms in a more general metadata context.

1.2 Abstract model for qualified DC

This document assumes the following abstract model for qualified Dublin Core:

  • A qualified DC record is made up of one or more properties and their associated values.
  • Each property is an attribute of the resource being described.
  • Each property must be either:
    • one of the 15 DC elements [DCMES],
    • one of the other elements recommended by the DCMI (e.g. audience) [DCTERMS],
    • one of the element refinements listed in the DCMI Metadata Terms recommendation [DCTERMS].
  • Properties may be repeated.
  • Each value is a string.
  • Each value may have an associated encoding scheme.
  • Each encoding scheme has a name.
  • Each string value may have an associated language (e.g. en-GB).

Note that for encoding schemes currently recommended by the DCMI, the name is specified in the DCMI Metadata Terms recommendation (listed as the 'Name', not the 'Label'). It is anticipated that the DCMI will develop other mechanisms for registering agreed names for encoding schemes in the future.

In the context of this document, it should be noted that the resource being described is an HTML/XHTML Web page and the Dublin Core™ record describing that resource is embedded into it using HTML/XHTML elements. It is only possible to describe a single resource (the Web page) using this method. To describe multiple resources (for example, multiple images), link to one or more separate XML or RDF/XML documents containing the multiple Dublin Core™ records.

2. XHTML encoding

Metadata should be embedded into the section of an XHTML Web page [XHTML11] using the and elements, as described here.

2.1 Elements and values

Use the 'name' and 'content' attributes of the XHTML element to encode the DC element (one of the 15 DCMES elements or one of the other elements defined by DCMI, e.g. audience) and its value. Use the following patterns:

<meta name="DC.element" content="Value" />
<meta name="DCTERMS.element" content="Value" />

For example:

<meta name="" content="2001-07-18" />
<meta name="DCTERMS.audience" content="software developers" />

As a general rule, element names may be mixed-case but should always have a lower-case first letter.

The value in the 'content' attribute is defined to be CDATA, i.e. a sequence of characters from the document character set which may include character entities. Long values may be wrapped across multiple lines as necessary.

2.2 Element refinements

Element refinements are also encoded using the 'name' and 'content' attributes of the XHTML element. Use the following pattern:

<meta name="DCTERMS.elementRefinement" content="Value" />

For example:

<meta name="DCTERMS.modified" content="2001-07-18" />

Element refinements should use the names specified in the DCMI Metadata Terms recommendation (listed as the 'Name', not as the 'Label'). As a general rule, element refinement names may be mixed-case but should always have a lower-case first letter.

2.3 Encoding schemes

Encoding schemes are encoded using the 'scheme' attribute of the XHTML element, using the following pattern:

<meta name="DC.element" scheme="DCTERMS.Scheme" content="Value" />

For example:

<meta name="" scheme="DCTERMS.W3CDTF" content="2001-07-18" />
<meta name="DC.type" scheme="DCTERMS.DCMIType" content="Text" />

Encoding schemes should use the names specified in the DCMI Metadata Terms recommendation (listed as the 'Name', not as the 'Label'). As a general rule, encoding scheme names may be mixed-case but should always start with an upper-case letter. Encoding scheme names are often all upper-case.

2.4 Linking to other resources

Where the value of a property is the URI of another resource (as is typically the case with the DC.relation element for example) an alternative form of encoding using the XHTML element is preferred. Use the following pattern:

<link rel="propertyName" href="resourceURI" />

For example:

<link rel="DC.relation" href="" />
<link rel="DCTERMS.references" href="" />

In some cases it may be appropriate to encode a list of DCMI and other 'Link types' [XHTMLLINK], for example:

<link rel="DC.rights copyright" href="" />
<link rel="DCTERMS.tableOfContents contents" href="" />

2.5 Language of the value

Where the language of the value is indicated, it should be encoded using the 'xml:lang' attribute of the XHTML element and/or the 'hreflang' attribute of the XHTML element. For example:

<meta name="DC.subject" xml:lang="en-GB" content="seafood" />
<meta name="DC.subject" xml:lang="fr" content="fruits de mer" />
<link rel="DC.relation" hreflang="en" href="" />
<link rel="DC.relation" hreflang="de" href="" />

2.6 Repeated elements and element refinements

Multiple property values should be encoded by repeating the XHTML element for that property, for example:

<meta name="DC.title" content="First title" />
<meta name="DC.title" content="Second title" />

Note that the order of repeated elements and element refinements is not guaranteed to be preserved across multiple software applications.

2.7 Namespace and profile considerations

The 'DC.' and 'DCTERMS.' prefixes in the property names above are used to indicate the namespace [DCNS] from which the property is taken. The namespace URI should be encoded in the XHTML element [RELSCHEMA], using the following pattern:

<link rel="schema.prefix" href="namespaceURI" />

For example:

<link rel="schema.DC" href="" />
<link rel="schema.DCTERMS" href="" />

While any string is allowable as the prefix, the use of 'DC.' and 'DCTERMS.' is recommended.

In order to give recipient software applications an indication of the XHTML profile that was used to encode the DCMI metadata, the 'profile' attribute of the XHTML element should be used to provide the URI of this DCMI recommendation, as follows:

<head profile="">

3. Compatability with other DCMI recommendations

Note that previous versions of this document (and other DCMI HTML-encoding documents) made some different recommendations to those found in this document, as follows:

  1. Previous recommendations specified using an uppercase first letter for the names of DCMES elements, for example 'Title' rather than 'title'.
  2. Previous recommendations specified prefixing element refinements by the element being refined, for example 'DC.Date.modified' rather than 'DCTERMS.modified'.
  3. Previous recommendations did not specify using a namespace prefix for encoding scheme names, for example 'URI' rather than 'DCTERMS.URI'.
  4. Previous recommendations did not specify using the HTML/XHTML element to encode properties with values that are the URI for another resource.

These forms of encoding are acceptable but are no longer considered the preferred form.

In general, any software applications that consume DC records embedded into HTML/XHTML Web pages should ignore the case of DC namespace prefixes, element names and element refinement names and should treat both '.' (full-stop) and ':' (colon) as valid separators between the prefix and the property name. I.e. all the following forms should be treated as being equivalent:

<meta name="" content="2001-07-18" />
<meta name="DC.Date" content="2001-07-18" />
<meta name="" content="2001-07-18" />
<meta name="dc:date" content="2001-07-18" />

as should:

<meta name="DC.Date.modified" content="2001-07-18" />
<meta name="DCTERMS.modified" content="2001-07-18" />


<meta name="DC.Date" scheme="W3CDTF" content="2001-07-18" />
<meta name="dc:date" scheme="dcterms:W3CDTF" content="2001-07-18" />

All applications should generate metadata according to the recommendations above.

4. Compatability with older versions of HTML

All the examples in this document conform to XHTML 1.1. The recommendations in this document can be applied to versions of HTML prior to XHTML 1.0 (e.g. HTML 4.01 [HTML401]) but the resulting syntax will be slightly different because older versions of HTML do not require the trailing '/' before the closing '>' in the HTML and elements. Furthermore, for HTML 4.01 and older versions of HTML, 'lang' should be used to indicate the language of the value, rather than 'xml:lang'. For XHTML 1.0 Transitional (i.e. XHTML designed to be compatible with HTML) both 'lang' and 'xml:lang' should be used, for other version of XHTML (such as 1.1) only xml:lang should be used.

5. Mixing DC metadata with other schemas

DC metadata can be mixed with non-DC metadata in HTML/XHTML elements. The following example embeds DC, AGLS [AGLS] and unspecified metadata properties in the same HTML/XHTML Web page:

<link rel="schema.DC" href="" />
<link rel="schema.AGLS" href="" />

<meta name="DC.title" content="Services to Government" />
<meta name="AGLS.Function" scheme="AGIFT" content="recordkeeping standards" />
<meta name="keywords" content="archives, information management,
public administration" />

Note that DCMI conventions for naming properties and encoding schemes may not apply to non-DC metadata elements.

6. Example

A qualified DC metadata record for this document is shown below. It can also be found embedded into the section of the HTML source of this Web page.

<head profile="">
<title>Expressing Qualified Dublin Core™ in HTML/XHTML meta and link elements</title>
<link rel="schema.DC" href="" />
<link rel="schema.DCTERMS" href="" />

<meta name="DC.title" lang="en" content="Expressing Qualified Dublin Core™
in HTML/XHTML meta and link elements" />
<meta name="DC.creator" content="Andy Powell, UKOLN, University of Bath" />
<meta name="DCTERMS.issued" scheme="DCTERMS.W3CDTF" content="2003-08-11" />
<meta name="DC.identifier" scheme="DCTERMS.URI"
content="" />
<link rel="DCTERMS.replaces" hreflang="en"
href="/specifications/dublin-core/dcq-html/2000-08-15/" />
<meta name="DCTERMS.abstract" content="This document describes how
qualified Dublin Core™ metadata can be encoded
in HTML/XHTML &lt;meta&gt; elements" />
<meta name="DC.format" scheme="DCTERMS.IMT" content="text/html" />
<meta name="DC.type" scheme="DCTERMS.DCMIType" content="Text" />

7. Acknowledgements

This document is based on existing recommendations for encoding Dublin Core™ metadata into HTML [RFC2731], the previous version of this document by Simon Cox, Eric Miller and Andy Powell, current practice on the Web and recent versions of the HTML/XHTML specifications.

8. References

[DCMI] Dublin Core™ Metadata Initiative

[HTML] HyperText Markup Language (HTML)

[DCRDF] Expressing Simple Dublin Core™ in RDF/XML
Dave Beckett, Eric Miller, Dan Brickley, 2001

[QDCRDF] Expressing Qualified Dublin Core™ in RDF / XML
Stefan Kokkelink, Roland Schwänzl, 2002

[DCXML] Guidelines for implementing Dublin Core™ in XML
Andy Powell, Pete Johnston

[DCMES] Dublin Core™ Metadata Element Set, Version 1.1: Reference Description

[DCTERMS] DCMI Metadata Terms

[XHTML11] XHTML 1.1: Module-based XHTML
W3C Recommendation, May 2001

[XHTMLLINK] The 'link'-Element in (X)HTML

[DCNS] Namespace Policy for the Dublin Core™ Metadata Initiative (DCMI)

[RELSCHEMA] A Proposed Convention for Embedding Metadata in HTML

[HTML401] HTML 4.01 Specification
Dave Raggett, Arnaud Le Hors, Ian Jacobs, 1999

[AGLS] AGLS Metadata Standard

[RFC2731] Encoding Dublin Core™ metadata in HTML
John Kunze, 1999