Categories
Blogging Web

Solving The Via Problem

Being able to link to other pages on the web is one of the things that makes the web work. Citing where the page where your found a link is something of a sub-trend with the explosion of blogging. I’ve done this myself, giving a link and then mentioning that I came across it via another site. While I generally refer to this as via, but others (like PhotoMatt) use the term hat tip. Either the idea is the same, to indicate were we came across the link. Unfortunately all of this is rather free form, it is easy enough for people to parse this and see the relationship, but there is nothing beyond that indicate that there is a relationship between the two links. What we really need is a way in markup to show the relationship.

Ryan King has a few ideas on how to deal with this. He’s referring to this problem as “hVia”. Go read his write up and on this and come back. Alright, lets see if I can’t take this a step further.

The problem is that we want to indicate how we discovered the page that we are linking to. There are several ways that we may want to describe how we got this URL. Ryan uses an example from PhotoMatt about getting a URL via email. Unfortunately in Ryan’s example that information isn’t really encoded in a meaningful way. It does help style the text a bit, but doesn’t help us scrape this information and come up a meaningful array of data. So how about we spell out what want out of a good solution:

  1. Markup that is easily parsed by computers
  2. Rendered in a way that is meaningful to people
  3. Allows for multiple types of references, examples would be (but not necessarily limited to):
    • Another URL
    • Email
    • IM/IRC
    • In Person
  4. Easy to style with CSS

With all this in mind I’m going to through out a couple of possibilities. Think of these as part of a brain storming session as opposed to firm suggestions as to the “right way” to do this.

  1. Cite and ID
    Add a unique id attribute to your link and use in the cite tag as a reference. Something like this:

    <a id=”unique_ref_id” href=”http://www.example.com/”>Neat Web Site</a>
    via <cite refid=”unique_ref_id”>Email from Bob</cite>

    This meets most of our qualifications: it is no more complex than parsing existing (X)HTML, allows text to flow nicely for human readers, could be used for any type of reference (albeit in a free form manner) and allows for easy styling. The weakest part of this format is that the type of reference isn’t spelled out, so parsers would have to try to make intelligent guesses about what the reference description is.

  2. Cite, ID and Type
    One way to improve upon the first method is to explicitly state why type of reference we are citing. Something like this:

    <a id=”unique_ref_id” href=”http://www.example.com/”>Neat Web Site</a>
    via <cite refid=”unique_ref_id” type=”email”>Email from Bob</cite>

    The only addition is the type element to the cite tag, which states outright how we were informed about the link. In addition to email we could have used any of the types listed above. With this hint, the data marked up with the cite tag could be treated in a semi-intelligent way. If the type was a URL then we could aggregate that data and follow propagation of links to a site and who was most referenced.

It’s getting late some I’m going to wrap this up for now. Hopefully this gives folks something to think about. I’d like to see more discussion about how do this successfully, so that all of our goals are met.

UPDATE 1:20am 7 May 2005: I forgot to mention, this is one of the complaints I have about del.icio.us, when adding a bookmark you should be able to enter a via reference. If there is going to be a serious discussion about how to deal with via references, then del.icio.us should at least be a consideration.