DCMI Mixing and Matching FAQ

Andy Powell
UKOLN, University of Bath


This document attempts to answer some of the practical questions that implementors ask when faced with a desire to incorporate their existing XML metadata semantics into DCMI metadata applications.

Question 1: My favorite XML schema contains an element type or attribute (e.g. my:price or my:currency) that I want to use in my Dublin Core metadata. How do I do it?

The bad news is that an existing XML element type or attribute cannot be used as is in DCMI metadata applications. This is a very important point, but is sometimes hard for people to understand. Before you can use your favorite element or attribute you must declare it as a DCMI-compatible term. The good news is that doing so need not be an overly onerous task. Here's what you have to do:

  1. Decide whether your XML element type or attribute corresponds to DCMI's notion of a 'property' or an 'encoding scheme'. These notions are defined in the DCMI Abstract Model but, for convenience, the definitions are repeated here:
    A property is a specific aspect, characteristic, attribute, or relation used to describe resources.
    Encoding scheme is the generic name for vocabulary encoding scheme and syntax encoding scheme.
    A syntax encoding scheme indicates that the value string is formatted in accordance with a formal notation, such as "2000-01-01" as the standard expression of a date.
    A vocabulary encoding scheme is a class that indicates that the value of a property is taken from a controlled vocabulary (or concept-space), such as the Library of Congress Subject Headings.
  2. Next, check whether an equivalent property or encoding scheme has already been defined by the DCMI (or elsewhere), for use in DCMI metadata. A good place to start checking is the list of DCMI Metadata Terms.
  3. Next, assign a URI reference to your new property or encoding scheme - see question 3 below.
  4. Finally, declare your new property or encoding scheme using the RDF Schema language (RDFS) and make this declaration available somewhere on the Web - see questions 4 and 5 below.

 

Question 2: Why can't I just re-use my XML element type or attribute as is?

Because XML element types and XML attributes are component parts of an XML language. Their meaning is determined solely by their placement in the XML tree structure of the given XML language and the semantics that the developers of that language chose to associate with that structure. On the other hand, DCMI properties and encoding schemes are conceptual entities within the DCMI Abstract Model - their meanings are defined by the model and by the semantic declarations that DCMI make available. Furthermore, XML element types and attributes are named using XML expanded names (a pair comprising an XML Namespace Name (which is a URI reference) and a local name). On the other hand, DCMI properties and encoding schemes are named using URI references.

So, although XML element types and DCMI properties may look superficially similar, for example lom:title looks similar to dc:title when the two are encoded in XML, in fact they are very different entities.

For those who are interested, the XML, RDF and DCAPs document provides a much more in-depth treatment of the differences between XML element types and RDF properties and the usage of both in the context of DCMI metadata.

Question 3: How do I assign a URI to my 'element'?

Unfortunately, there is little best-practice in this area to draw on at the time of writing. The Guidelines for assigning identifiers to metadata terms document lists some possible approaches.

One immediate issue to consider is whether to make the URI reference that is assigned to the new property or encoding scheme similar to the XML expanded name of the XML element or attribute. DCMI has chosen to keep the two things very similar. For example, the XML expanded name that is used to represent the DC Title property according to the Guidelines for encoding DC in XML recommendation is dc:title (correspoinding to the http://purl.org/dc/elements/1.1/ XML namespace name and the title local name). The DC Title property is assigned the http://purl.org/dc/elements/1.1/title URI reference. Therefore, the property URI reference is simply a concatenation of the component parts of the XML expanded name.

On the other hand, the RDF encoding of the IEEE LOM (which has effectively made the LOM available for use with DCMI metadata because the DCMI Abstract Model is essentially the same as the RDF model) has chosen to keep the XML expanded names used in the LOM/XML encoding and the URI references assigned to the LOM/RDF properties completely separate. Example to be provided

Remember that your new property is likely to appear in the various DCMI encoding syntaxes using the name that is the final part of the URI reference you assign (usually the bit after the final '/' or '#'). For example, the URI reference http://example.com/my/terms#color is likely to appear as my:color (in XML syntaxes) or MY.color (in HTML syntaxes).

If in doubt, register with the PURL system and assign a PURL to your new property or encoding scheme.

Question 4: How do I declare my XML element type or attribute as a DCMI property?

Use the RDF Schema language to do this. Take a look at the DCMI RDFS terms declarations for inspiration! As a minimum, you'll need something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dcterms="http://purl.org/dc/terms/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

  <rdf:Property rdf:about="http://purl.org/my/terms/price">
    <rdfs:label xml:lang="en-US">Price</rdfs:label>
    <rdfs:comment xml:lang="en-US">The amount of money needed to purchase the resource.</rdfs:comment>
    <rdfs:isDefinedBy rdf:resource="http://purl.org/my/terms/"/>
    <dcterms:issued>2004-12-03</dcterms:issued>
    <dcterms:modified>2005-02-21</dcterms:modified>
    <dc:type rdf:resource="http://dublincore.org/usage/documents/principles/#element"/>
  </rdf:Property>
</rdf:RDF>

Make sure that this RDF/XML document is available (in this case) at both http://purl.org/dc/terms/ and http://purl.org/my/terms/price.

Question 5: How do I declare my XML element type or attribute as a DCMI encoding scheme?

Use the RDF Schema language to do this. Take a look at the DCMI RDFS terms declarations for inspiration! As a minimum, you'll need something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dcterms="http://purl.org/dc/terms/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

  <rdfs:Class rdf:about="http://purl.org/my/terms/PoundsSterling">
    <rdfs:label xml:lang="en-US">Pounds Sterling</rdfs:label>
    <rdfs:comment xml:lang="en-US">A price in UK pounds sterling, formatted in the following way: "P.pp"
    (where "P" representents one or more digits for the number of pounds and "pp" represents
    two digits for the number of pence).</rdfs:comment>
    <rdfs:isDefinedBy rdf:resource="http://purl.org/dc/terms/"/>
    <dcterms:issued>2003-07-11</dcterms:issued>
    <dcterms:modified>2004-06-15</dcterms:modified>
    <dc:type rdf:resource="http://dublincore.org/usage/documents/principles/#encoding-scheme"/>
  </rdfs:Class>
</rdf:RDF>

The examples used in questions 4 and 5 would allow the following XML fragment to be used in a DC/XML document that conforms to the Guidelines for implementing Dublin Core in XML recommendation:

<my:price xsi:type="my:PoundsSterling">2.99</my:price>

assuming that the appropriate namespace declarations are in place. Note that, by convention, the XML local name for an encoding scheme starts with an uppercase letter.

Question 6: I still don't understand! Do you have another example?

OK. Let's say that I want to start using DC metadata to describe car parts, and that my company (ZZ Motors) already uses an XML schema that allows for XML fragments like this:

<zz:carpart>
  <zz:engine>
    <zz:type>petrol</zz:type>
    <zz:capacity>2000cc</zz:capacity>
  </zz:engine>
  <zz:fueltank>
    <zz:capacity>25l</zz:capacity>
  </zz:fueltank>
<zz:carpart>

'zz' being associated with the http://zz.com/carparts/ XML namespace name.

For the sake of argument, let's say that I want to start using a property in my DC metadata that indicates the engine capacity. Looking at my existing XML schema, I note that I already have an XML element type with the local name capacity (under zz:engine) that I might be able to use? But there's a problem! I also have an XML element type with the local name capacity elsewhere in my XML tree structure (under zz:fueltank). So I cannot simply use 'capacity' as the local name when I'm thinking about assigning a URI reference to my new property.

The semantics of my current XML element types called capacity are determined by the placement of those two element types in the XML tree. In fact I have two 'properties', which we'll call engineCapacity and fueltankCapacity. I'm interested in the first of these.

OK, so now I need to assign a URI reference to my new property called engineCapacity. I want this property to be widely used (because it'll make my supply chains work more smoothly if everyone else uses the same property) so I decide to name my new property using a PURL, rather than a URI reference somewhere under my company's DNS domain name. I choose:

http://purl.org/carparts/terms/engineCapacity

Now I need to declare my new property using RDFS. I create a file on my company's Web site that contains the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dcterms="http://purl.org/dc/terms/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

  <rdf:Property rdf:about="http://purl.org/carparts/terms/engineCapacity">
    <rdfs:label xml:lang="en-US">Engine Capacity</rdfs:label>
    <rdfs:comment xml:lang="en-US">The total combustion chamber size of an engine in cubic centimetres.</rdfs:comment>
    <rdfs:isDefinedBy rdf:resource="http://purl.org/my/terms/"/>
    <dcterms:issued>2005-02-21</dcterms:issued>
    <dcterms:modified>2005-02-21</dcterms:modified>
    <dc:type rdf:resource="http://dublincore.org/usage/documents/principles/#element"/>
  </rdf:Property>
</rdf:RDF>

Finally, I register two PURLs, http://purl.org/carparts/terms/ and http://purl.org/carparts/terms/engineCapacity, and configure them both so that they resolve to the RDF/XML document (above) on my Web server.


Content by: Andy Powell
Last updated: 22-Feb-2005