purple numbers

More Purple

Brad Neuberg left a comment on where to find the proxy...or rather, that left me an email address so I could email him that there was no download link :P I've got it now, so now I can transclude the introduction from the purple-include page here directly (note: probably Firefox only at this point -- you should some purple text below after this rolling symbol: ):

And that was just one more line in the Drupal module to set the meta tag:

drupal_set_html_head('<meta name="purple_proxy_path" content="/' . $path . '/purple-proxy.php" />');

Now I just have to hope that bad, terrible things won't happen from this proxy.

Testing Purple

It's been quite some time since I wrote about purple numbers -- fragment identifiers for bits of text within HTML documents. Or, Granular Addressability in HTML documents as E.E. Kim describes in 'An Introduction to Purple'.

Back then, I wasn't a fan of these anchor links, as anchor links aren't first class web citizens -- where links are currency. I'm still not a fan, but maybe the anchor links are just there to make it easy to grab pieces of this content.

A recent reference by Les Orchard (oh, look, OPML anchor tags!) to purple-include, which enables transclusion (aka including content from elsewhere, directly inline, rather than copy/paste) got the brain cells tickling tonight. So I built a Purple module for Drupal. Which, in reality, just includes the purple-include.js and a little bit of CSS to make purple links show up. I am trying to include some of Simon Willison's plinks cleverness, but not sure if I'm going to get that working.

Transclusion feels very SemWebby. No, I'm not going to use the dreaded Web 3.0-label (but do go read the Business 2.0 article if you want a backgrounder (via Nova Spivack, of course). Ahem. Back to the point.

From Facebook apps to photos stored on Flickr, we want to have all our "stuff" just magically collected together wherever we happen to be, whatever network we happen to be interacting with. Aggregation, sucking this content in, pushing it over there -- all just temporary ways of flowing content around. One that arguably duplicates content and spews extraneous permalinks around. I just want my pictures right here, or I just want to link deep into someone else's posting and pull in a piece of text. And I want the "other end" to know about that inclusion, a gentle ping, yeah, kind of a trackback. That's the Semantic Web to me: where every plain old HTML file is dynamic and intelligent and knows about the links and people that are incoming and outgoing.

OK, now to Purple. Here's an example that includes a file I have on my server, shamelessly copied from the purple-include examples page. First the code:

<hx:include src="/sites/bmannconsulting.com/files/purple_include.html#xpath!//p"></hx:include>

And now the transcluded bit:

Update: Kevin reports that the transclusion doesn't work in Safari. Stupid client side technologies :P

Note: I don't *actually* know XPath. But if you open the file directly, you'll see it just grabbed the paragraph. I'm assured you can do more complicated things than that :P

To Do: #

  • Find out where purple-proxy is hiding / what to do with it so I can transclude from elsewhere
  • autogenerate plinks / pilcrows / numbers, perhaps via a Drupal filter
  • make a real module available somewhere, maybe also tracking down jluster's old purple numbers code

Purple everywhere

ongoing: Purple Pilcrows:

When everyone from Lauren to Aaron Swartz is whining at me to make the #-marks go away, I have to listen. I’ve adapted Simon Willison’s brilliant hack, and a couple of remarks are worth making.

These "purple numbers", where individual paragraphs are able to be linked to, is an interesting concept (I've linked to Tim's post because he has pointed to most of the other interesting discussions around this, and because generally I enjoy his "take" on things). But, since anchors aren't actually first class citizens, I would say that a way to link to (and only display) relevant paragraphs is more useful and powerful. This could also be used for TransClusion -- including content from other places locally. An iframe is an ugly way of doing this -- you would likely need some wiki-like framework to make it possible.

So, you need a dynamic system where you can point to an entire article (e.g. /article-name/), and then a way to get just individual paragraphs (e.g. /article-name/p/1). You could probably do ranges of paragraphs this way as well: /article-name/p/1-3.

The more we link, the more we get enmeshed in other people's thoughts and ideas: I think this is a good thing.

Syndicate content