innovation in metadata design, implementation & best practices

Dublin Core Metadata Initiative - Using Dublin Core in XML


Using Dublin Core in XML

Creator: Dave Beckett
Institute for Learning and Research Technology (ILRT)
University of Bristol
Creator: Eric Miller
Creator: Dan Brickley
Date Issued: 2000-07-14
Replaces: Not Applicable
Is Replaced By:
Latest version:
Status of document: This is a DCMI Working Draft.
Description of document: The Dublin Core Element Set V1.1 (DCES) can be represented in many syntax formats. This document explains how to encode the DCES in XML, provides a DTD to validate the documents and describes a method to link them from web pages.

1. Introduction

The Dublin Core Element Set V1.1 (DCES) [DCES] can be represented in many syntax formats. This document explains how to encode the DCES in XML[XML-SPEC], provides a DTD to validate the documents and describes a method to link them from web pages.

This document describes encoding the DCES in XML subject to these restrictions:

This document is based on previous work done in [DCRDF], [EM-DTD], [BATHP], [CIMI-XML-TB] and [CIMI-DC-DTD].

2. Writing Dublin Core in XML

This section describes step by step how to create a document for the DCES in XML.

2.1. XML version declaration

Any well-formed XML document will include a statement of the version of XML used. At present, the only valid version of XML, as defined in the W3C Recommendation, is 1.0. Documents should therefore include the statement

<?xml version="1.0"?>

on their first line.

2.2. Referencing the XML DTD

### 2.3. Declaring the use of RDF It is necessary to declare that RDF[RDFMS] is being used, as this makes it easier for programs to interpret the meaning of the document. This is done by including
<rdf:RDF xmlns:rdf=""
as the next line in the document, following the XML DTD reference. ### 2.4. Describing the resources For each resource described by Dublin Core elements, they must be enclosed in a container element - a pair of rdf:Description tags - with one container for each resource. Resources must be identified by URIs and one URI must be inserted in the about attribute of the rdf:Description element like this:
<rdf:Description about="http://..../">
(see below for what to do about other _Identifier_ elements) Inside the rdf:Description container, put each of the Dublin Core elements with the dc: namespace prefix before them, so for example the _Title_ element becomes dc:title (all lowercase) and used inside the rdf:Description container like this:
<rdf:Description about="http://..../">
  <dc:title>My Home Page</dc:title>

This can be repeated for all other DCES elements that are needed with the standard Dublin Core guidelines - all elements are repeatable and optional. Note that the order of the elements is not guaranteed to be preserved.

There must be at least one Identifier element for the resource containing a URI and this must be made the value of the about attribute of the rdf:description element as described above. The values of other Identifier elements should be contained in the same manner as the other elements.

2.5. Language and character encoding

XML provides an xml:lang attribute that can be used on any element. This provides a way to describe the language used for the content of the element. The DCES provides a Language element which is used to describe the language of the resource.

The value of the elements needs to be encoded using the rules of XML when there are special characters in the value. The special characters that need to be encoded are summarised here for reference:

        <th>XML Encoding</th>







        <td>' (apostrophe / single quote)</td>


        <td>" (double quote)</td>




All other characters with a value higher than 127 should not be encoded with the HTML entities such as é since these are not defined in XML. Numerical values either as &#nnn; or hexadecimal as &xxx; should be used, or Unicode in the UTF-8 encoding.

3. Examples

Plain text

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf=""
  <rdf:Description about="">
    <dc:title>Dave Beckett's Home Page</dc:title>
    <dc:creator>Dave Beckett</dc:creator>
    <dc:publisher>ILRT, University of Bristol</dc:publisher>

Example 1
Example 2
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf=""
         xmlns:dc ="">
 <rdf:Description about="">
   <dc:title>Dublin Core Metadata Initiative - Home Page</dc:title>
   <dc:description>The Dublin Core Metadata Initiative Web site.</dc:description>
   <dc:contributor>The Dublin Core Metadata Initiative</dc:contributor>

(The above examples were machine generated from the actual XML source file so should be correct) ## 4. Linking to Dublin Core metadata in XML from HTML Dublin Core encoded in the method described here can be refered to from an HTML document and associated with it by means of the HTML element. The recommended relation type for this purpose is REL="meta", used like this:
      <LINK REL="meta" HREF="mydoc.dcxml">
where mydoc.dcxml is the URI of the XML document being refered to. ## 5. Validating the XML with the DTD The DTD and example documents have to be validated with an XML parser that can handle URIs for the DTDs. Unfortunately, this isn't very widely supported at present. One online validator that seems to handle this is the service at []( All validating XML parsers support using local files for DTDs in the SYSTEM parameter. This can be used to validate with the DTD by saving it from the URL given in section 2.2 to a local file and amending the DC/XML documents to have, for example: <!DOCTYPE rdf:RDF SYSTEM "dces.dtd"> at the start and then validating with the XML parser. However **DO NOT** publish documents with this local URL! The examples in this document have been validated (using the trick described in the previous paragraph) with James Clarks' [SP]( validating SGML parser V1.3.4 used with XML encoding and XML catalog (xml.soc) as described in his [XML support page]( The configuration used on unix was as follows:
unix% export SP_CHARSET_FIXED=yes
unix% export SP_ENCODING=XML
unix% export SGML_CATALOG_FILES=/usr/local/lib/sgml/xml.soc
unix% nsgmls -wxml document.dcxml
## 6. Rationale This document was written to provide an "official" DTD for encoding simple Dublin Core metadata in XML. Simple here means that there are no extra elements, qualifiers, optional or varying parts. This allows the resulting data to be validated by existing XML parsers. XML Schema may in future allow extra validation to be done on XML but at the time of writing is not standardised. We realised that the should be other DTDs for encoding DC in XML (DC with qualifiers, DC in RDF/XML written all as attributes, ...) but this document is for the simplest possible version. Our goal was also to make this simple XML format also be valid RDF since this allows even the simplest DC in XML document to be manipulated using the power of RDF. We have tried to limit the RDF "baggage" to the minimum for users, and it is mostly a standard header and footer to the documents which should be familiar to people from HTML. ## Appendix A - DTD for Dublin Core Element Set 1.1 in XML The URL for this DTD is [](/schemas/dcmes-xml-20000714.dtd)

  DRAFT XML DTD 20000619 for Dublin Core Element Set version 1.1

    Using Dublin Core in XML 

    Dave Beckett <>
    Eric Miller <>
    Dan Brickley <>

  Based on
    Dublin Core Metadata Element Set, Version 1.1: Reference Description 


<!-- The namespaces for RDF and DCES 1.1 respectively -->
<!ENTITY rdfns '' >
<!ENTITY dcns '' >

<!-- Magic - do not look behind the curtain -->
<!ENTITY % rdfnsdecl 'xmlns:rdf CDATA #FIXED "&rdfns;"' >
<!ENTITY % dcnsdecl 'xmlns:dc CDATA #FIXED "&dcns;"' >

<!-- The wrapper element -->
<!ELEMENT rdf:RDF (rdf:Description)* >

<!ATTLIST rdf:RDF %rdfnsdecl; %dcnsdecl; >

<!ENTITY % dces "dc:title | dc:creator | dc:subject | dc:description |
dc:publisher | dc:contributor | dc:date | dc:type | dc:format |
dc:identifier | dc:source | dc:language | dc:relation | dc:coverage |
dc:rights" >

<!-- The resource description container element -->
<!ELEMENT rdf:Description (%dces;)* >

<!ATTLIST rdf:Description about CDATA #REQUIRED>

<!-- The elements from DCES 1.1 -->

<!-- The name given to the resource. -->
<!ELEMENT dc:title (#PCDATA)>

<!-- An entity primarily responsible for making the content of the
resource. -->
<!ELEMENT dc:creator (#PCDATA)>

<!-- The topic of the content of the resource. -->
<!ELEMENT dc:subject (#PCDATA)>

<!-- An account of the content of the resource. -->
<!ELEMENT dc:description (#PCDATA)>

<!-- The entity responsible for making the resource available. -->
<!ELEMENT dc:publisher (#PCDATA)>

<!-- An entity responsible for making contributions to the content of
the resource. -->
<!ELEMENT dc:contributor (#PCDATA)>

<!-- A date associated with an event in the life cycle of the resource. -->
<!ELEMENT dc:date (#PCDATA)>

<!-- The nature or genre of the content of the resource. -->
<!ELEMENT dc:type (#PCDATA)>

<!-- The physical or digital manifestation of the resource. -->
<!ELEMENT dc:format (#PCDATA)>

<!-- An unambiguous reference to the resource within a given context. -->
<!ELEMENT dc:identifier (#PCDATA)>

<!-- A Reference to a resource from which the present resource is derived. -->
<!ELEMENT dc:source (#PCDATA)>

<!-- A language of the intellectual content of the resource. -->
<!ELEMENT dc:language (#PCDATA)>

<!-- A reference to a related resource. -->
<!ELEMENT dc:relation (#PCDATA)>

<!-- The extent or scope of the content of the resource. -->
<!ELEMENT dc:coverage (#PCDATA)>

<!-- Information about rights held in and over the resource. -->
<!ELEMENT dc:rights (#PCDATA)>

(The above DTD was machine generated from the actual DTD source file so should be correct)


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

[XML-SPEC] Extensible Markup Language (XML) 1.0, W3C Recommendation, 10 February 1998

[DCRDF] Guidance on expressing the Dublin Core within the Resource Description Framework (RDF)

[EM-DTD] DTD's for the Dublin Core Element Set, Eric Miller

[BATHP] Bath Profile Appendix D - eXtensible Markup Language (XML) Document Type Definition for Dublin Core Simple

[CIMI-XML-TB] The use of XML as a transfer syntax for museum records during the CIMI Dublin Core test bed : some practical experiences, Bert Degenhart Drenth
MS Word (no non-proprietary format available):

MS Word (no non-proprietary format available):

[RDFMS] Resource Description Framework (RDF) Model and Syntax Specification, W3C Recommendation, 22 February 1999