The Dublin Core

The Dublin Core calls itself a "metadata initiative," and it provides an RDF content model that is in wide use to describe Web resources. The Dublin Core has attracted the attention of museums, libraries, government agencies, and commercial groups as a way of standardizing RDF for Web resources. You can find out all about the Dublin Core at its home page, http://www.purl.org/dc.

In the previous example, I used a <Creator> property, without specifying a namespace for that property. However, when you create your own properties, you should use a namespace to avoid conflicts. The Dublin Core's namespace is "http://purl.org/DC/". In fact, the <Creator> property I've been using is modeled after the Dublin Core's <Creator> property. I can declare the Dublin Core's namespace—which is usually given the prefix dc—in the example document, and indicate that <Creator> is part of that namespace, like this:

<?xml version="1.0" ?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://purl.org/DC/">
    <rdf:Description about="http://www.starpowder.com/planets.html">
        <dc:Creator>Nicolas Copernicus</dc:Creator>
    </rdf:Description>
</rdf:RDF>

The <Creator> property is just one Dublin Core property; you can find all the defined Dublin Core properties in Table 18.1.

Table 18.1. Dublin Core Properties
ElementDescription
ContributorNames the person or organization that has contributed in some way to this resource.
CoverageGives the extent or scope of the content of the resource. For example, this might include location, time, or jurisdiction.
CreatorNames the person, organization, or service responsible for creating the resource. Typically it refers to the resource's author.
DateGives a date connected to the resource, such as its last update or its creation date. The recommended practice for encoding the date value is defined in ISO 8601, which follows the YYYY-MM-DD format.
DescriptionGives the description of the resource. For example, this could be an abstract, table of contents, or text description of the resource.
FormatGives the format used for the resource. Usually, the format includes the media type or dimensions of the resource. Readers may use Format to determine the software, hardware, or other equipment needed. You usually use a MIME type here.
IdentifierGives an ID value for the resource in its context. Recommended practice is to identify the resource by means of a string or number as part of a formal identification system. For example, you might use a URI or an International Standard Book Number (ISBN).
LanguageSpecifies the language of the resource. Recommended practice is to use values defined by RFC 1766, which includes a two-letter Language Code (from the ISO 639 standard), with an optional two-letter Country Code (from the ISO 3166 standard).
PublisherNames the agent responsible for making the resource available. Usually, this is a person, an organization, or a service.
RelationIs a reference to a related resource or relationship type.
RightsGives information about rights about the resource. For example, a Rights element can contain intellectual property rights, copyright, or various other property rights.
SourceRefers to a resource from which the current resource is derived.
SubjectGives the topic of the content of the resource. Recommended practice is to select a value from a formal classification scheme. For example, subjects might be keywords, key phrases, or classification codes.
TitleIs a name given to the resource.
TypeGives the type of the content of the resource, usually a term describing general categories or functions. Recommended practice is to select a value from a formally defined and publicly available vocabulary.

Each Dublin Core element also 10 ten attributes, which are taken from the ISO/IEC 11179 standard:

AttributeDescription
CommentIs a comment about the use of the data in the element
DatatypeSpecifies the type of data in the element
DefinitionDefines the concept behind the data in the element
IdentifierIs a unique identifier assigned to the element that identifies it
LanguageSpecifies the language of the data in the element
Maximum OccurrencePuts a limit on how many times the element may occur
Nameis the name you've assigned to the data element
ObligationSpecifies whether the element is required
Registration AuthorityRefers to the agency or group authorized to register the element
VersionGives the version of the element

In fact, 6 of these 10 attributes are common to all the Dublin Core elements, and they have fixed values. Here they are, along with their values:

AttributeValue
Version1.1
Registration AuthorityDublin Core Metadata Initiative
Languageen (that is, English)
ObligationOptional
DatatypeCharacter String
Maximum OccurrenceUnlimited

The Dublin Core also lists a set of default resource types that you can use with the <Type> element:

  • collection

  • dataset

  • event

  • image

  • interactive resource

  • model

  • party

  • physical object

  • place

  • service

  • software

  • sound

  • text

You can find these types defined in detail at http://purl.org/DC/documents/wd-typelist.htm.

Describing Multiple Properties

The example RDF document that we've seen so far has defined only one property for the "http://www.starpowder.com/planets.html" resource—the <Creator> property. In fact, you can assign multiple properties to resources, and now that we've seen all the available Dublin Core elements, I'll put more of them to work. For example, here's how I describe that resource's creator, title, and type:

<?xml version="1.0" ?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://purl.org/DC/">
    <rdf:Description about="http://www.starpowder.com/planets.html">

        <dc:Creator>Nicolas Copernicus</dc:Creator>
        <dc:Title>Mercury</dc:Title>
        <dc:Type>text</dc:Type>
    </rdf:Description>

</rdf:RDF>

Describing Multiple Resources

An RDF document can also describe multiple resources—all you have to do is use multiple <rdf:Description> elements. For example, here's an RDF document that describes three resources, mercury.html, venus.html, and earth.html:

<?xml version="1.0" ?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://purl.org/DC/">
  
  <rdf:Description about="http://www.starpowder.com/mercury.html">
        <dc:Creator>Nicolas Copernicus</dc:Creator>
        <dc:Title>Mercury</dc:Title>
        <dc:Type>text</dc:Type>
    </rdf:Description>
    <rdf:Description about="http://www.starpowder.com/venus.html">
        <dc:Creator>Nicolas Copernicus</dc:Creator>
        <dc:Title>Venus</dc:Title>
        <dc:Type>text</dc:Type>

    </rdf:Description>
    <rdf:Description about="http://www.starpowder.com/earth.html">
        <dc:Creator>Nicolas Copernicus</dc:Creator>
        <dc:Title>Earth</dc:Title>
        <dc:Type>text</dc:Type>
    </rdf:Description>>

</rdf:RDF>
					

Nesting Resources

What if a property itself needs more description? For example, what if the creator of the resource is described by a Web page, and you want to refer the reader to that page? In that case, you can nest <rdf:Resource> elements. For example, if you want to describe Nicolas Copernicus, the creator of planets.html, with another Web page, NickC.html, that might look like this:

<?xml version="1.0" ?
<rdf:RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://www.purl.org/DC/">

    <rdf:Description about="http://www.starpowder.com/planets.html">
        <dc:Title>Mercury</dc:Title>
        <dc:Creator>
            <rdf:Description about="http://www.starpowder.com/NickC.html">
                 <dc:Title>Nicolas Copernicus</dc:Title>
                 <dc:Language>en</dc:Language>
            </rdf:Description>
        </dc:Creator>
    </rdf:Description>
</rdf:RDF>

Referring to Resources by Reference

There's another way to refer to a resource that describes a property—you can give the resource's URI using the rdf:resource attribute. You use this attribute in the property element. Here's an example; in this case, I'm referring to the resource NickC.html to describe the creator of various documents:

<?xml version="1.0" ?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://www.purl.org/DC/">

    <rdf:Description about="http://www.starpowder.com/mercury.html">
        <dc:Title>Mercury</dc:Title>
        <dc:Creator rdf:resource="http://www.starpowder.com/NickC.html"/>
    </rdf:Description>

    <rdf:Description about="http://www.starpowder.com/venus.html">
        <dc:Title>Venus</dc:Title>
        <dc:Creator rdf:resource="http://www.starpowder.com/NickC.html"/>
    </rdf:Description>

    <rdf:Description about="http://www.starpowder.com/earth.html">
        <dc:Title>Earth</dc:Title>
        <dc:Creator rdf:resource="http://www.starpowder.com/NickC.html"/>

    </rdf:Description>
</rdf:RDF>

As you can see, using the rdf:resource attribute makes it easy to connect the same property to a number of resources; in this case, I'm giving the mercury.html, venus.html, and earth.html all the same creator properties.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.198.233