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

Creators: Andy Powell
UKOLN, University of Bath
Date Issued: 2003-11-30
Latest Version: https://dublincore.org/specifications/dublin-core/dcq-html/
Release History: https://dublincore.org/specifications/dublin-core/dcq-html/release_history/
Description: This document describes how Dublin Core metadata can be encoded in HTML/XHTML <meta> and <link> elements.

1. Introduction

This document describes how a 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:

Resource
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.
Property
a property is a specific aspect, characteristic, attribute, or relation used to describe resources.
Record
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.

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="DC.date" 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="DC.date" 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="http://www.example.org/" />
<link rel="DCTERMS.references" href="http://www.example.org/publications/2002/176459.pdf" />

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="http://www.example.org/rights.html" />
<link rel="DCTERMS.tableOfContents contents" href="http://www.example.org/toc.html" />

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="http://www.example.org/en/" />
<link rel="DC.relation" hreflang="de" href="http://www.example.org/de/" />

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="http://purl.org/dc/elements/1.1/" />
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />

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 must be used to provide the URI of this DCMI recommendation, as follows:

<head profile="http://dublincore.org/specifications/dublin-core/dcq-html/">

3. Compatibility 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. I.e. all the following forms should be treated as being equivalent:

<meta name="DC.date" content="2001-07-18" />
<meta name="DC.Date" 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" />

and:

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

All applications must generate metadata according to the recommendations above.

4. Compatibility 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="http://purl.org/dc/elements/1.1/" />
<link rel="schema.AGLS" href="http://www.naa.gov.au/recordkeeping/gov_online/agls/1.2" />

<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="http://dublincore.org/specifications/dublin-core/dcq-html/">
<title>Expressing Dublin Core™ in HTML/XHTML meta and link elements</title>
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />

<meta name="DC.title" lang="en" content="Expressing 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-11-01" />
<meta name="DC.identifier" scheme="DCTERMS.URI"
content="http://dublincore.org/specifications/dublin-core/dcq-html/" />
<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" />
</head>
...

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
http://dublincore.org/

[HTML]
HyperText Markup Language (HTML)
http://www.w3.org/MarkUp/

[DCRDF]
Expressing Simple Dublin Core™ in RDF/XML
Dave Beckett, Eric Miller, Dan Brickley, 2001
http://dublincore.org/specifications/dublin-core/dcmes-xml/

[QDCRDF]
Expressing Qualified Dublin Core™ in RDF / XML
Stefan Kokkelink, Roland Schwänzl, 2002
http://dublincore.org/specifications/dublin-core/dcq-rdf-xml/

[DCXML]
Guidelines for implementing Dublin Core™ in XML
Andy Powell, Pete Johnston
http://dublincore.org/specifications/dublin-core/dc-xml-guidelines/

[DCMES]
Dublin Core™ Metadata Element Set, Version 1.1: Reference Description
http://dublincore.org/specifications/dublin-core/dces/

[DCTERMS]
DCMI Metadata Terms
http://dublincore.org/specifications/dublin-core/dcmi-terms/

[XHTML11]
XHTML 1.1: Module-based XHTML
W3C Recommendation, May 2001
http://www.w3.org/TR/xhtml11

[XHTMLLINK]
The 'link'-Element in (X)HTML
http://www.subotnik.net/html/link

[DCNS]
Namespace Policy for the Dublin Core™ Metadata Initiative (DCMI)
http://dublincore.org/specifications/dublin-core/dcmi-namespace/

[RELSCHEMA]
A Proposed Convention for Embedding Metadata in HTML
http://www.w3.org/Search/9605-Indexing-Workshop/ReportOutcomes/S6Group2.html

[HTML401]
HTML 4.01 Specification
Dave Raggett, Arnaud Le Hors, Ian Jacobs, 1999
http://www.w3.org/TR/html40/

[AGLS]
AGLS Metadata Standard
http://www.naa.gov.au/records-management/create-capture-describe/describe/AGLS/index.aspx

[RFC2731]
Encoding Dublin Core™ metadata in HTML
John Kunze, 1999
http://www.ietf.org/rfc/rfc2731.txt