Jul 2, 2010 - A quick XML success story.

XML gets a bad rap from time to time, some criticisms against it are fair, most of the time it is people seem to complain about a bad application of XML and confuse that with the mark-up being bad.

Sometimes though it is just brilliant,

the inclusion of GEO data in RSS is such a time. Why do I like this so. Well like a lot of RSS parsers I was completely unaware of the spec until about a week ago. That is kind of the point of namespaces, if you don’t understand something, you can ignore it without harm. So there have been all of these RSS feeds with geo information in and nothing broke most people will probably never notice the difference but if someone is interested they can now find GEO data in RSS feeds.

The other thing which is also brilliant is that there doesn’t need to be just one way of doing things. While working out why the geo data wasn’t working in my foursqare feed (turned out it was a problem with the feed) I looked into the simplepie file. I realised there were two standards georrs and w3c_basic_geo. OK one would be simpler but as they are standards with publicised schemas it is easy to interpret them. You can pick and choose what you want to interpret if another standard comes along it won’t break anything and you can choose to support it if you want.

Finally of course (and also brilliant) is that this GEO data doesn’t have to be part of a RSS feed. I could have some completely bespoke XML schema for, say recording narratives in RDF, and add geo data too it in a standard universally understood way.

May 17, 2010 - Building an ontology (part1)

I am used to working with semantic web technology, however often the decisions made in some of the ontologies I have seen baffle me. While they are technically correct, they sometimes seem a little strange.

What I realise is that I have not gone through the exercise myself yet. Over the next few months I intend to go through the process of building an ontology, so that I may better understand why things have been done in others that I read.

I will document my progress, and thinking here, to hopefully provide guidance and insight to people who need to do the same in future.

The subject I have chosen for this is “Narrative works.” I would like to create an ontology to describe stories, characters and the relations between them…

Actually that could be split in two. One ontology to describe stories and another to describe relations, I may come back to that thought later.


This is difficult to pin down, before I have given too much thought to it. I’ll try and create a user story.

“As a narrative ontology user I would like to be able to describe a story in context so that I can analyse the story and determine facts about it.”

That is still a little woolly. How about some use cases?

Describe (in increasing detail):

  • A simple fairy tail
  • A play
  • Something which has multiple formats eg book of the film.
  • A TV series
  • The life of superman.


  • The story in chronological order
  • The story from a characters point of view.
  • Differences between versions of a story.
  • Differences between versions of a character.

I may alter the scope as I go, depending on how things pan out.

There is quite a lot of philosophical discussion about naratology which I would study in depth if this were my doctorate, but as I am using this just as an example to try building an ontology I will just dip into the subject as I need to.

May 13, 2010 - Notes on creating a mobile site with Drupal

Some notes after creating a basic mobile tool using Drupal. Not exhaustive research but could be handy to someone trying to do the same.

Created a new theme got rid of all regions bar $content.

Also as we didn’t need them for the app, commented out tabs.

Even if you keep all content in a page small it looks like webkit will still zoom out by default. <meta name = "viewport" content = "initial-scale = 1.0"> sets the zoom level to 1.

However even with the meta tag above webkit will still zoom out if there are widths which push the content above the width of the screen.

So I had to make sure there were no CSS widths specified. Percentages seem to work well. If you are worried about how things will look on a full size screen you can use max-width (even though this won’t help those on IE6).

Even after that some form items end up being created too small so I had to do a hook_form_alter and make sure size was 20 for all textarea and password fields.

I didn’t research too much but it looks like the android webkit struggles with long class names, things like div#block-formblock-node_entry just wouldn’t match.

Quriksmode mobile browser CSS tests is also a handy find