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.

4 replies on “Solving The Via Problem”

Joseph- thanks for the feedback, I have a couple of responses–

We think that at this time trying to encode the vector type is too much. Personally, I’d rather get a basic microformat first, then look into something like that later. Of course, I may be the only one.

Second, I can’t find any references to using the refid attribute in the cite tag. Are you sure this is valid XHTML? If so, I’d appreciate a pointer to some info on it. Same thing goes for the type attribute.

I’d like to provide a way for people to encode this information, but it may be more productive to figure out the basic problem first.

And, as a sidenote, I prefer the name citeVia to hVia, so it may change. Anyway, thanks for the discussion, please continue with feedback.

If you are looking for something to work with in the current spec then we’ll probably have to think about this in a different way. I wasn’t overly concerned with following current attributes while throwing out my first few ideas. Not worrying about encoding how we discovered the link certainly reduces the problem set.

Using the id attribute becomes a problem because it needs to be unique also, which I’d thought of that before 🙁

There are also no specific attributes for the cite tag, so we’d have to use one of the general element attributes.

Now that I’m looking through the HTML spec, it looks like the q tag might be a good place to start. Using the cite element of the q tag does a good job of providing the information in a parser friendly way, but it doesn’t display very well to a human reader.

Plenty more to think about.

First of all, I absolutely want something that will work with the current spec. People are already using via-links, there’s no reason to make people wait for a new version of xhtml or use a namespace to make it work better.

Of course, the q tag is for a direct quotation. I think via links are similar, yet different. We’re giving attribution (which is a citation), but not for the content itself. Instead, the attribution is for a pointer to the content.

Not quite sure if this might help, but a while ago I came up with the idea of using a meta tag to indicate that a certain post is a reply. Maybe, for a post that has a single “hat-tip”, we could use the same idea with replacing name="in-reply-to" with name="hat-tip" or name="link-via".

Leave a Reply

Your email address will not be published. Required fields are marked *