transclusion

Boring site note: which feed do you want?

I put together a feeds page which describes the content of the 2 main feeds I have available*.

Feedburner (which I recently re-fell in love with after re-tuning this site and adding the Drupal Feedburner module) tells me that about 450 of you are subscribed to my main front page stuff (out of which I recently removed my del.icio.us link splicing), and about 100 of you subscribe to the front page + personal + Flickr + del.icio.us links super feed of doom.

But wait! There's more!

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
Syndicate content