selfdescription.org

Self-description – primer

The self description microformat at it’s simplest looks like this:

<html>
<head>
<title>Library of Special Collections</title>
</head>
<body class="collection">
<div class="collection">
<a name="pipe-working-tools">
<h3 class="name">Pipe working tools</h3>
</a>
<p class="description">
This is a description about a collection with
<span class="extent">10 <span class="format">books</span></span>
about <abbr class="subject" title="AAT">badgers</abbr>.
</div>
</body>
</html>

Which in a browser might render like this:

Pipe working tools

This is a description about a collection with 10 books about badgers.

Collections

In this example, the <body> tag has a class ‘collection’ which denotes that all content within the tag relates to the collection. In fact, where a collection is declared on a <body> tag, it could also be inferred that the name of the collection is the same as the contents of the <title> tag, or the first level heading (<h1>) could be used to name the parent collection.
We then have a <div> tag that is also marked as a collection. We now see a collection within a colection.

As a brief aside – <div>, <p>, <ul>, <ol> and <li>, are block elements, and can be thought of as containers, so a <p> within a <div> is a child of the <div>. In the same way that a collection marked up as <p class="collection"> within a <div class="collection"> is a child of the collection within the <div>.

Names of collections

Names of collections are tagged with the class ‘name’. It really is this simple! :) So in our example we have both an anchor and a heading that are named ‘Pipe working tools’. In this case using class=”name” in the heading element is really redundant, as the anchor tag already contains the name attribute, and it is wrapped around the heading, but it serves to show that a typical use might be using class=”name” on heading elements.

The collection description

In the example the description of the collection is a simple string of text. There is no requirement to list a set of attributes and values to describe your collection. The idea is that you can use language that is appropriate to your audience, and that reads engagingly. After all you want people to come and visit you, or to make use of these collections.

In our example the description is marked by using class=”description” on the <p> tag. Anything within that paragraph is part of the description. If the next paragraph is also marked with class=”description”, it will be considered to be part of the description for the last named collection.

Identifying specific data within a collection description

We can identify the format of items within the collection, or the extent of the collection or the subject of the collection or choose from several other descriptors (see the microformat specification under the documents heading in the menu). To identify these elements within the abstract, we can use a <span> tag to wrap the text, and simply state in the class attribute, the type of data within the span.

These <span> tags can be nested, to clarify meaning. So in our example we see that the ‘extent’ information also includes some ‘format’ information. saying there are “10 books” makes more sense than saying the size of this collection is 10. 10 what? Multiple extent and format types can be used to accurately represent the nature of your collection. for example you might want to say “we have 1000 books and 300 pamphlets”.

The subject class can be used with a <span> tag, but in our example it is used with an abbreviation tag to indicate that the term ‘Badger’ is taken from the Art and Architecture Thesaurus.

That’s it!

Once your collection description data is marked up, you can then start to see it become visible around the web.

Note: 27th November 2006. As I write this there are no current services that make use of collection description data. But I am hopeful that a number of things will happen:

  1. That a ‘ping’ service will be available, so that the URL of your page can be sent to a web service which can harvest your collection description.
  2. That an index of existing collection descriptions will also be available.
  3. That larger organisations will include collection descriptions on their pages.
  4. That plug ins and web services/tools for the end user will be built, allowing them to save, share, comment on and discuss collections.

If you are interested in contributing to these ideas, or have any of your own, please get in touch!

tim@selfdescription.org