Hi WSG'ers

After seeing Sarah's post about CSS for titles, I thought that people might be interested in this idea. It's a half baked idea. If you have any comments or suggestions, I would love to hear them.

Apologies for those who have already seen this on the DC-General list.

** The problem **
People updating Web pages often doesn't update the metadata in the header.

** The solution **
Tag appropriate Web data with id attributes. Point to the data from the appropriate metadata field in the header.

** Example **
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
        <title>Naked Metadata</title>
        <meta name="DC.title" content="#title" />
        <meta name="DC.creator" content="#creator" />
        <meta name="DC.creator" content="#rights" />
</head>
<body>
        <h1 id="title">Naked Metadata</h1>
        <h2 id="creator">Jonathan O'Donnell</h2>
<p id="rights">http://purl.nla.gov.au/net/jod/tutorial/metadata.html &copy; Jonathan O'Donnell 23 October 2005</p>
</body>
</html>

** Background **

At DC-ANZ 2005, Eve Young and Baden Hughes made the point that people updating Web pages often don't update the metadata. One of of the problems that they talked about was that metadata in the header is essentially invisible to people editing the page (when, for example, using some wysiwyg editors).

In general, data (including metadata) should be stored in one place only. This prevents drift: if it is only stored in one place, it can only be updated in that place.

Often, the information that we want to store as metadata already appears in the Web page. Examples include the title, description (especially as opening paragraph) and the author's name. In footers, we often find rights information, the URL, and date information.

If this information already exists in the data, and we replicate it in the metadata, there is the danger of drift. Perhaps pointing to the data from the metadata fields is a way of preventing drift, and ensuring that the metadata is as up-to-date as the data.

** Method **

In html (including xhtml), one way of doing this is to use id attributes. Many Web developers use these already to style particular aspects of a Web site. They can also be used as a target anchor for hypertext links
For example, if you use this tag:
        <p id="rights">&copy; Jonathan 2005</p>
in the page:
        http://example.net/foo.html
Then the URL
        http://example.net/foo.html#rights
will point to that paragraph.

** Advantages **
+       Metadata sits with the data.
+       As data is updated, the metadata continues to be current.

** Disadvantages **
+       id attributes must be unique within a Web page.

--
Jonathan O'Donnell
mailto:[EMAIL PROTECTED]
http://purl.nla.gov.au/net/jod
+61 4 2575 5829

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to