WordPress, TinyMCE and RDFa editors

I’m writing this in WordPress’s ‘Visual’ mode WYSIWYG HTML editor, and thinking “how could it be improved to support RDFa?”

Well let’s think. Humm. In RDFa, every section of text is always ‘about’ something, and then has typed links or properties associated with that thing. So there are icons ‘B’ for bold, ‘I’ for italics, etc. And thingies for bulleted lists, paragraphs, fonts. I’m not sure how easily it would handle the nesting of full RDFa, but some common case could be a start: a paragraph that was about some specific thing, and within which the topical focus didn’t shift.

So, here is a paragraph about me. How to say it’s really about me? There could be a ‘typeof’ attribute on the paragraph element, with value foaf:Person, and an ‘about’ attribute with a URI for me, eg. http://danbri.org/foaf.rdf#danbri

In this UI, I just type textual paragraphs and then double newlines are interpreted by the publishing engine as separate HTML paragraphs. I don’t see any paragraph-level or even post-level properties in the user interface where an ‘about’ URI could be stored. But I’m sure something could be hacked. Now what about properties and links? Let’s see…

I’d like to link to TinyMCE now, since that is the HTML editor that is embedded in WordPress. So here is a normal link to TinyMCE. To make it, I searched for the TinyMCE homepage, copied its URL into the copy/paste buffer, then pressed the ‘add link’ icon here after highlighting the text I wanted to turn into a link.

It gave me a little HTML/CSS popup window with some options – link URL, target window, link title and (CSS) class; I’ve posted a screenshot below. This bit of UI seems like it could be easily extended for typed links. For example, if I were adding a link to a paragraph that was about a Film, and I was linking to (a page about) its director or an actor, we might want to express that using an annotation on the link. Due to the indirection (we’re trying to say that the link is to a page whose primary topic is the director, etc.), this might complicate our markup. I’ll come back to that later.

tinymce link edit screenshop

tinymce link edit screenshot

I wonder if there’s any mention of RDFa on the TinyMCE site? Nope. Nor even any mention of Microformats.

Perhaps the simplest thing to try to build into TinyMCE would be for a situation where a type on the link expressed a relationship between the topic of the blog post (or paragraph), and some kind of document.

For example, a paragraph about me, might want to annotate a link to my old school’s homepage (ie. http://www.westergate.w-sussex.sch.uk/ ) with a rel=”foaf:schoolHomepage” property.

So our target RDFa would be something like (assuming this markup is escaped and displayed nicely):

<p about=”http://danbri.org/foaf.rdf#danbri” typeof=”foaf:Person” xmlns:foaf=”http://xmlns.com/foaf/0.1/”>

I’m Dan, and I went to <a rel=”foaf:schoolHomepage” href=”http://www.westergate.w-sussex.sch.uk/”>Westergate School</a>

</p>.

See recent discussion on the foaf-dev list where we contrast this idiom with one that uses a relationship (eg. ‘school’) that directly links a person to a school, rather than to the school’s homepage. Toby made some example RDFa output of the latter style, in response to a debate about whether the foaf:schoolHomepage idiom is an ‘anti-pattern’. Excerpt:

<p about=”http://danbri.org/foaf.rdf#danbri” typeof=”foaf:Person” xmlns:foaf=”http://xmlns.com/foaf/0.1/”>

My name is <span property=”foaf:name”>Dan Brickley</span> and I spent much of the ’80s at <span rel=”foaf:school”><a typeof=”foaf:Organization” property=”foaf:name” rel=”foaf:homepage” href=”http://www.westergate.w-sussex.sch.uk/”>Westergate School</a>.

</p>

So there are some differences between these two idioms. From the RDF side they tell you similar things: the school I went to. The latter idiom is more expressive, and allows additional information to be expressed about the school, without mixing it up with the school’s homepage. The former simply says “this link is to the homepage of Dan’s school”; and presumably defers to the school site or elsewhere for more details.

I’m interested to learn more about how these expressivity tradeoffs relate to the possibilities for visual / graphical editors. Could TinyMCE be easily extended to support either idiom? How would the GUI recognise a markup pattern suitable for editing in either style? Can we avoid having to express relationships indirectly, ie. via pages? Would it be a big job to get some basic RDFa facilities into WordPress via TinyMCE?

For related earlier work, see the 2003 SWAD-Europe report on Semantic blogging from the team then at HP Labs Bristol.

Local Video for Local People

OK it’s all Google stuff, but still good to see. Go to Google Maps, My Maps, to find ‘Videos from YouTube’ listed. Here’s where I used to live (Bristol UK) and where I live now (Amsterdam, The Netherlands). Here’s a promo film of some nearby art installations from ArtZuid, who even have a page in English. I wouldn’t have found the video or the nearby links except through the map overlay. I don’t know exactly how they’re geotagging the videos, I can’t see an option under ‘my videos’ in YouTube, so perhaps it’s automatic or viewer annotations. In YouTube, you can add a map link under ‘My Videos’ / ‘Edit Video'; I didn’t see that initially. I made some investigations into similar issues (videos on maps) while at Joost; see brief mention in my Fundamentos Web slides from a couple of years ago.
Oh, nearly forgot to mention: zooming out to get a Europe or World-wide view is quite striking too.

Underground Victorian street? in Bristol?

Hidden away beneath Lawrence Hill lies a secret world – an underground Victorian street stretching from Ducie Road to the Packhouse pub.

Local historian Dave Stephenson finds out more.

For many years I had heard tales of a Victorian street abandoned beneath busy Lawrence Hill. To add substance to the legend there were people who claimed to have seen it when they were young.

They told me that this underground street stretched from Ducie Road, near the now closed Earl Russel pub, to the Packhorse pub, in tunnels under the road.

All had Victorian shop fronts, some still with their glass intact, and several street lamps still hung on the walls.

From the Underground Bristol forum. Rather vaguely attributed to  ‘a Bristol Newspaper – July 2007′; perhaps the Evening Post, though it would apparently cost a search fee to find out. The quoted article goes on to say that the underground street is pretty messed up now, with rubbish, and has been looted quite comprehensively.

Nokiana: the one about the CIA, Syria, and the N95

Matt Kane resurfaced on Bristol‘s underscore mailing list  with this intriguing snippet, after some travels around the middle-east: ” … discovered N95s (not mine) cannot be taken into Syria”.

I asked for the backstory, which goes like this:

Quite a palaver. Got the train from Istanbul to Syria (amazing trip!). At the border they didn’t search the bags of “westerners” but asked us all to show our phones and cameras. They glanced at them all quickly, checking the brand (“Nikon, ok. SonyEricsson, ok”). One guy had an N95 and they led him off the train. His sister informed us that they’d said it wasn’t allowed in Syria, and that if she knew her brother he’d not give it up without a fight. Despite being on contract, he argued with them for an hour and a half, even calling the embassies in Damascus and Ankara. In the end he gave it up, with a promise that they’d send it on to the airport from where he was leaving. A few days later we’re chatting with a barman and spot his phone – an N95, and yes, he got it in Syria! A few days after that we found out the full story from our hotel owner in Damascus. Apparently the CIA gave a load of bugged N95s to high-ranking Kurdish officials in Iraq, many of which were then smuggled into Syria and given as gifts to various shady characters. After the Hezbollah guy was assassinated in Damascus a few months ago, the Syrians set about trying to root out spies, which led to this ban on bringing N95s into the country. Apparently.

This is the first I’ve heard of it, but searching throws up a few references to rigged N95s as “spy phones”.

Somewhat-unrelated aside: I don’t believe the relevant functionality is exposed in the N95’s widget APIs yet. I had trouble making it vibrate, let alone self-destruct after this message. But at least widget/gadget/app security is getting some attention lately. It can’t be too long before “spy widgets” on your phone become a real concern, particularly since the exposure of phone APIs to 3rd party apps is such a creative combination. I should be clear that AFAIK, Nokia’s N95 widget platform is free of such vulnerabilities currently, and any “spy phone” mischief so far has been achieved through other kinds of interference. But it does make me glad to see a Widgets 1.0: Digital Signature spec moving along at W3C…

OpenID and Wireless sharing

via Makenshi in #openid chat on Freenode IRC:

<Makenshi>: I found a wireless captive portal solution that supports openid.

With the newest release of CoovaAP, some new features in Chilli are demonstrated in combination with RADIUS to allow OpenID based authentication. (coova.org)

I’m happy to see this. It’s very close to some ideas I was discussing with Schuyler Earle and Jo Walsh some years ago around NoCatAuth, FOAF and community wireless. Some semweb stories may yet come to life.

At the moment, the options available for wireless ‘net sharing are typically: let everyone in, have a widely known secret for accessing your network, or let more or less nobody in without individually approving them. Although the likes of Bruce Schneier argue the merits of open wireless, most 802.11 kit now comes out of the box closed by default, and usually stay that way. Having a standards-based and decentralised way of saying “you can use my network, but only if you login with some identifiable public persona first” would be interesting.

OpenID takes away a significant part of the problem space, allowing experimentation with a whole range of socially oriented policies on top. Doubtless there are legal risks, big privacy issues, and lurking security concerns. But there is also potential for humanising interactions that are currently rather anonymous. In the city I live in, Bristol, there’s a community wireless effort, Bristol Wireless, as well as wireless Internet in countless local cafes. Plus commercial hotspots and whatever the city council are up to. Currently these are fragmented, and offer a variety of approaches. Could OpenID offer a common approach for Bristolians to connect? I like the idea that (for those that choose to ‘go public’) OpenIDs could link scattered presence across community sites. Having OpenID-based login used eg. for cafe-based access could be a nice step in that direction. But would people trust their local cafe to know what they’re doing online any more than they trust Google? Should they?

20Q +/- 2

I was just revisiting 20q.net, reminded after seeing the ontogame site. The latter starts with a Wikipedia/dbpedia concept, and asks you to classify it according to some ontological criteria, I think drawn from Proton. The former (neural-net based I think) lets uses supply random concepts, and when needed provide distinguishing yes/no characteristics. I wish all such sites pumped their conclusions (or a subset) back into the Web, perhaps under the new open data license (see also semantic-web thread).

Here’s 20Q’s attempt to guess the location I was thinking of (Bristol, where I live):

Q22.            I am guessing that it is Bristol (England)? Right, Wrong, Close
21.	  	Is it very noisy? Sometimes.
20.	  	I guessed that it was Lancaster (England)? Wrong.
19.	  	Is it popular with teenagers? Sometimes.
18.	  	I guessed that it was Carlisle (England)? Wrong.
17.	  	Is it known for volcanic activity? No.
16.	  	Is its official language English? Yes.
15.	  	Is it associated with a team sport? No.
14.	  	Is it small? No.
13.	  	Is it located in Scotland? No.
12.	  	Is it a city? Yes.
11.	  	Is it hilly? Yes.
10.	  	Does it have wild animals? No.
9.	  	Is it located in Canada? No.
8.	  	Are cars often seen there? Yes.
7.	  	Is it located in the western hemisphere? Yes.
6.	  	Is it made of wood? No.
5.	  	Do people live there ? Yes.
4.	  	Is it found in a warm climate? No.
3.	  	Is it a crowded place? No.
2.	  	Does it have a specific tourist season? No.
1.	  	Is it located in the United States? No. 

After I said “yes”, I got this feedback:

It is Bristol.
Is it associated with a team sport? You said No, 20Q was taught by other players that the answer was Yes.
Contradictions Detected
The opinions of the 20Q A.I. are its own, and are based on the input of players. 20Q's answers reflect common knowledge. If you feel that 20Q is in error, the only way to correct it is to play again!
Similar Objects
Carlisle (England), Spokane, WA, Lancaster (England), Providence, RI, Walla Walla, WA, Belfast (Ireland), Launceston (Australia), Bainbridge Island, WA, London (England), Brighton (England), Butte, MT, Durham (England).

Huh, we have a sports team? Who’d have thought it? I guess some things are subjective…

Shadows on the Web

This is a quick note, inspired by the recent burst of posts passing through Planet RDF about RDF, WebArch and a second “shadow” Web. Actually it’s not about that thread at all, except to note that Ian Davis asks just the right kind of questions when thinking about the WebArch claim that the Web ships with a hardcoded, timeless and built-in ontology, carving up the Universe between “information resources” and “non-information resources”. Various Talis folk are heading towards Bristol this week, so I expect we’ll pick up this theme offline again shortly! (Various other Talis folk – I’m happy to be counted as Talis person, even if they choose the worst picture of me for their blog :).

Anyhow, I made my peace with the TAG’s http-range-14 resolution long ago, and prefer the status quo to a situation where “/”-terminated namespaces are treated as risky and broken (as was the case pre-2005). But RDFa brings the “#” WebArch mess back to the forefront, since RDF and HTML can be blended within the same environment. Perhaps – reluctantly – we do need to revisit this perma-thread one last time. But not today! All I wanted to write about right now is the “shadow” metaphor. It crops up in Ian’s posts, and he cites Rob McCool’s writings. Since I’m unequiped with an IEEE login, I’m unsure where the metaphor originated. Ian’s usage is in terms of RDF creating a redundant and secondary structure that ordinary Web users don’t engage with, ie. a “shadow of the real thing”. I’m not going to pursue that point here, except to say I have sympathies, but am not too worried. GRDDL, RDFa etc help.

Instead, I’m going to suggest that we recycle the metaphor, since (when turned on its head) it gives an interesting metaphorical account of what the SW is all about. Like all 1-line metaphorical explanations of complex systems, the real value comes in picking it apart, and seeing where it doesn’t quote hold:

‘Web documents are the shadows cast on the Web by things in the world.

What do I mean here? Perhaps this is just pretentious, I’m not sure :) Let’s go back to the beginnings of the SW effort to picture this. In 1994 TimBL gave a Plenary talk at the first International WWW Conference. Amongst other things, he announced the creation of W3C, and described the task ahead of us in the Semantic Web community. This was two years before we had PICS, and three years before the first RDF drafts. People were all excited about Mosaic, to help date this. But even then, the description was clear, and well illustrated in a series of cartoon diagrams, eg:

TimBL 1994 Web semantics diagram

I’ve always liked these diagrams, and the words that went with them.

So much so that when I had the luxury of my own EU project to play with, they got reworked for us by Liz Turner: we made postcards and tshirts, which Libby delighted in sending to countless semwebbers to say “thanks!”. Here’s the postcard version:

SWAD-Europe postcard

The basic idea is just that Web documents are not intrinsically interesting things; what’s interesting, generally, is what they’re about. Web users don’t generally care much about sequences of unicode characters or bytes; we care about what they mean in our real lives. The objects they’re about, the agreements they describe, the real-world relationships and claims they capture. There is a Web of relationships in the world, describable in countless ways by countless people, and the information we put into the Web is just a pale shadow of that.

The Web according to TimBL, back in ’94:

To a computer, then, the web is a flat, boring world devoid of meaning. This is a pity, as in fact documents on the web describe real objects and imaginary concepts, and give particular relationships between them. For example, a document might describe a person. The title document to a house describes a house and also the ownership relation with a person. [...]

On this thinking, Web documents are the secondary thing; the shadow. What matters is the world and it’s mapping into digital documents, rather than the digital stuff alone. The shadow metaphor breaks down a little, if you think of the light source as something like the Sun, ie. with each real-world entity shadowed by a single (authoritative?) document in the Web. Life’s not like that, and the Web’s not like that either. Objects and relationships in the real world show up in numerous ways on the Web; or sometimes (thankfully) not at all. If Web documents can be thought of as shadows, they’re shadows cast in many lights, many colours, and by multiple independent light sources. Some indistinct, soft and flattering; occasionally frustratingly vague. Others bright, harshly precise and rigorously scientific (and correspondingly expensive and experty to use). But the core story is that it’s the same shared world that we’re seeing in all these different lights, and that the Web and the world are both richer because life is illustrated from multiple perspectives, and because the results can be visible to all.

The Semantic Web is, on this story, not a shadow of the real Web, but a story about how the Web is a shadow of the world. The Semantic Web is, in fact, much more like a 1970s disco than a shadow…

In email hell

I’m tagging this ‘rdf’ so it finds it’s way to my various friends and collaborators in the RDF and SemWeb community via planetrdf.com.

Just a brief tale of this week’s woe, and a note on how to contact me while I fix things up.

Since leaving W3C at the end of last year, my email hosting has been moving around a bit. I have various addresses all of which have been forwarded to a single account, which I typically access via IMAP and sometimes SSH/mutt. For years, this was at ILRT, Uni Bristol. And then it was at W3C. Post-W3C I had my mail live on the Porklips/Postdiluvian community box, but decided to move over to Dreamhost since we’d never gotten IMAP working successfully for me on that machine, I was missing the mail-tagging capabilities of Thunderbird, .. and because I’d already bought Dreamhost hosting for some Web sites I run. So a few weeks back I flipped the switch and danbri@danbri.org moved again, to Dreamhost.

What’s the big problem? In short, Spam. I get 1000s of junk mails daily, … plus a generally high amount of email from mailing lists of various kinds. Spamassassin has been my main tool for dealing with this, along with (at W3C) a rather large whitelist, which I’ve not managed to set-up again since.

On Dreamhost, I’ve been finding that if I turn my back for a couple of days, my mailbox is drowning in junk. And that the Spam Assassin config options I chose, even though supposedly quite picky, … seem to be letting loads of rubbish through. I’m not sure what I’m doing wrong, but it got to the stage that Thunderbird was so slow and unresponsive (due to the size of the junk-filled inbox) that it was barely ussable for deleting things, let alone reading/writing.

At which point a few days ago, I decide to give Opera a whirl. It has a good reputation, so I tried it. It spent a long time doing something, what exactly I’m not sure since Thunderbird doesn’t work so well any more. But it has a nice virtual folders look, with much mail apparently sorted by the mailing list it was sent to. I think this is ‘views’ based, but am rather unclear which mails are being moved down to this laptop where I’m running Opera, and which are via IMAP. And things are still pretty slow.

I need to count to 10, calm down, and figure out a cleaner way of handling all this. Either staying at Dreamhost or moving elsewhere (recommendations welcome!!). At the moment I don’t have procmail on my Dreamhost setup (due to confusion between 2 kinds of inbox offering there). If I can get whitelist-based protection up and running again, maybe I’ll be OK.

In the meantime, if you need to reach me. Try IM, or my increasingly used Gmail account (ie. danbrickley—at— gmail -dot- com). Please try to keep that address more or less safe from spam harvesters. I should try zapping the few places it does appear.

Sorry for any inconvenience. If you’ve sent me anything urgent or very important in last week or two, I’d be grateful if you could re-send it to danbrickley….at…gmail.com

Oh, last thing to tie this back into RDF and justify the planetrdf.com tag, … if anyone’s interested to throw around whitelist sharing ideas again, I’m all ears. There’s got to be a better way of doing things. I’ve spent all week getting a sinking feeling at the idea of even trying to open my inbox…