The purple module in my Drupal CVS sandbox.
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: #
Recent comments
11 hours 41 min ago
13 hours 49 min ago
2 days 6 hours ago
3 days 12 hours ago
4 days 6 hours ago
4 days 22 hours ago
5 days 12 hours ago
6 days 7 hours ago
1 week 7 hours ago
1 week 8 hours ago