Tag URI

Tag URI

Purpose

The tag algorithm lets people mint — create — identifiers that no one else using the same algorithm could ever mint. It is simple enough to do in your head, and the resulting identifiers can be easy to read, write, and remember. The identifiers conform to the URI (URL) Syntax.

Status

2005-10-26: The 'tag' URI scheme has been published as RFC 4151.

To do:

History

In early 2001, similar schemes were proposed independently by (Sandro Hawke, The TANN URI Scheme) and Tim Kindberg (list email and this draft). We then collaborated to develop the current scheme, with feedback from various sources.

Here is a short and incomplete history of drafts prior to RFC publication.

Tutorial

I (Sandro) have a dog named Taiko, which is a fairly obscure name, but I can't be sure he's the only dog on the planet with that name. I want to be able to talk about him using just his name (without reference to myself, the town I live in, etc) and I want to be sure people will not accidentally think I'm talking about some other dog also named Taiko. So I'm going to give him a tag URI.

Step 1. Identify myself. I have two choices: I can use one of my e-mail addresses (sandro@hawke.org, sandro@w3.org, sandro@world.std.com) or I can use a domain name assigned to me (such as hawke.org). I could also use a shared domain name (w3.org) if I had explicit permission from the domain holder.

Step 2. Pick a date. It's possible that in 100 years my great grandson Sandro Hawke IV will be using "sandro@hawke.org" for e-mail. He may even have a dog named Taiko, and I still want my tag to name my Taiko, not his. So I pick some date during which the address "sandro@hawke.org" was definitely mine. I'll pick yesterday, Tuesday, June 5, 2001.

Step 3. Encode the date as characters, using ISO 8601: "2001-06-05". If I had picked the first day of a month, back in step 2, I would not include the day. If I had picked the first day of a year, I would not include the month or day.

Step 4. Pick a unique name for the object. But it has to be unique only for the already-chosen identity and date. "Taiko" seems like a fine choice here. I don't want to use a name like "1", because then I'm much more likely to get confused and accidentally call my other dog "1". I also want to avoid accidentally reusing a name, but by always using the previous day's date I essentially eliminate that risk: I only need to remember names for the rest of the day.

Step 5. Combine them like this: tag:sandro@hawke.org,2001-06-05:Taiko.

FAQ

Who is using tags?

Tags are used to identify blog items in the Atom personal publishing standard, as in this example.

Tags are also used in YAML to identify type information.

Please let Tim Kindberg know of other uses.

What does a given tag denote?

That's undefined in the tag specification; you'd need to look at the particular protocol in which they are used. Tags constitute only a scheme for minting identifiers: there is no authoritative resolution mechanism.

Why not use an http URL instead?

Indeed, Sandro might instead have named his dog http://hawke.org/2001/06/05/Taiko.

There are different points of view about this. The main argument against tags is "Why invent a new URI scheme when an old one — http — could be used?" Some arguments in favour are:

When can I use a tag someone else minted? What if someone else uses a tag I minted?

This specification only tells people how to mint unique identifiers. Policies concerning the use of these identifiers should be set for each situation or protocol in which they are used.

Why restrict tags to utilise only domain names and email addresses?

We considered other identifiers assignable on a quantum of a day, such as telephone numbers and IP numbers. But it seemed better to keep things simple.

Are tags good XML Namespace Names?

There are two schools of thought about XML namespace names: (1) the name serves purely to distinguish otherwise-identical XML element names, and (2) the names leads to documentation, schema, and other information about the elements. For people firmly in the first camp, tags make good namespace names; for everyone else, working http URIs are recommended.

Are tags good RDF identifiers?

As with XML Namespaces, there are two schools of thought. Do you want the web's default mechanism at your disposal for fetching information about the identified thing? If so, then HTTP URIs are probably better used.

Do tags have anything to do with the W3C's TAG (Technical Architecture Group)?

No!

This Site

This web site is maintained by Tim Kindberg and Sandro Hawke as a place for authoritative information about the "tag" URI scheme. It is expected to stay small and simple.

Last updated 2008-07-09.