都柏林核心™都柏林元数据倡议——利用有限公司re™ in XML

Title:

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
Identifier: //www.voudr.com/specifications/dublin-core/dcmes-xml/2000-07-14/
Replaces: Not Applicable
Latest version: //www.voudr.com/specifications/dublin-core/dcmes-xml/
Status of document: This is a DCMIWorking 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:

  • The Dublin Core™ elements described in the DCES V1.1 reference can be used
  • No other elements can be used
  • No element qualifiers can be used
  • The resulting XML cannot be embedded in web pages

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

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

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 ofrdf:Descriptiontags - with one container for each resource. Resources must be identified by URIs and one URI must be inserted in the关于attribute of therdf:Descriptionelement like this:

 ... 
(see below for what to do about other _Identifier_ elements)

Inside therdf:Descriptioncontainer, put each of the Dublin Core™ elements with thedc:namespace prefix before them, so for example theTitleelement becomesdc:title(all lowercase) and used inside therdf:Descriptioncontainer like this:

 My Home Page 

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 oneIdentifierelement for the resource containing a URI and this must be made the value of the关于attribute of therdf:descriptionelement as described above. The values of otherIdentifierelements should be contained in the same manner as the other elements.

2.5. Language and character encoding

XML provides anxml:langattribute that can be used on any element. This provides a way to describe the language used for thecontentof the element. The DCES provides aLanguageelement which is used to describe the language of theresource.

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:

XML Encoding   & &amp;   < &lt;   > &gt;   ' (apostrophe / single quote) &apos;   " (double quote) &quot;    

All other characters with a value higher than 127 shouldnotbe 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
 
    Dave Beckett's Home Page Dave Beckett ILRT, University of Bristol 2000-06-06  
    
Example 2
    Dublin Core™ Metadata Initiative - Home Page The Dublin Core™ Metadata Initiative Web site. 1998-10-10 text/html en The Dublin Core™ Metadata Initiative  

(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

都柏林Core™ encoded in the method described here can be refered to from an HTML document and associated with it by means of the HTMLelement. The recommended relation type for this purpose isREL="meta", used like this:

mydoc.dcxml

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 athttp://www.stg.brown.edu/service/xmlvalid/

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:

at the start and then validating with the XML parser. HoweverDO NOTpublish documents with this local URL!

The examples in this document have been validated (using the trick described in the previous paragraph) with James Clarks'SPvalidating SGML parser V1.3.4 used with XML encoding and XML catalog (xml.soc) as described in hisXML 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//www.voudr.com/schemas/dcmes-xml-20000714.dtd

                                            

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


References

[DCES]都柏林Core™ Metadata Element Set, Version 1.1: Reference Description
//www.voudr.com/specifications/dublin-core/dces/1999-07-02/

[XML-SPEC]Extensible Markup Language (XML) 1.0, W3C Recommendation, 10 February 1998
http://www.w3.org/TR/REC-xml

[DCRDF]Guidance on expressing the Dublin Core™ within the Resource Description Framework (RDF)
http://www.ukoln.ac.uk/metadata/resources/dc/datamodel/WD-dc-rdf/

[EM-DTD]DTD's for the Dublin Core™ Element Set, Eric Miller
http://rdf.dev.oclc.org/dc/xml/dtd.html

[BATHP]Bath ProfileAppendix D - eXtensible Markup Language (XML) Document Type Definition for Dublin Core™ Simple
http://www.ukoln.ac.uk/interop-focus/activities/z3950/int_profile/bath/draft/Appendix_D__XML_DTD.htm

[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):http://www.cimi.org/specifications/dublin-core/XML_for_DC_testbed_rev.doc

[CIMI-DC-DTD]CIMI Dublin Core™ DTD
MS Word (no non-proprietary format available):http://www.cimi.org/specifications/dublin-core/CIMI-DC-DTD_210400.doc

[RDFMS]Resource Description Framework (RDF) Model and Syntax Specification, W3C Recommendation, 22 February 1999http://www.w3.org/TR/REC-rdf-syntax

whereis the URI of the XML document being refered to.
Example 1