Thursday, April 30, 2009

Tokenising the semantic web

To summarise the argument; first, we know that we need to be able to tokenise URIs, because they tend to be long and unwieldy. However, whilst the current use of prefixes to abbreviate URIs is useful, it only allows us to tokenise URIs that are used to identify vocabularies, and not full URIs. It's also not ideal that these prefixes are being expressed using a document architecture mechanism -- @xmlns.
By adding a new attribute -- @token -- to the CURIE processing rules, we can tokenise full URIs, which gives authors the same level of simplicity that Microformats has. The key difference though, is that this tokenisation is completely scaleable, and so overcomes one of the major drawbacks of Microformats.

Read more at Tokenising the semantic web on my webBackplane blog.

Labels: , , , , , , , , , , , , ,

Thursday, April 23, 2009

More RDFa goodness from UK government web-sites

With my semweb consultantancy hat on, I've been working for a few months now on a number of RDFa projects with the UK's Central Office of Information. These projects have generally followed the same pattern:
  • define a vocabulary for some specific area of interest, such as job vacancies or government consultations;
  • use that vocabulary in HTML pages, via RDFa;
  • get my colleagues at webBackplane to build a prototype application using Drupal and ARC2, that both publishes and consumes pages in the right format;
  • add an application to Yahoo!'s SearchMonkey to process the RDFa pages.
A couple of days ago the UK Civil Service web-site was updated with a new look, and some exciting new features, some of which stem from the projects I've been involved in. There is still some more testing to do, so there haven't been any firm announcements yet, but I'm allowed to talk about one particular feature that is very exciting, the presence of RDFa in each of the job vacancies.

Read more at More RDFa goodness from UK government web-sites on my webBackplane blog.

Labels: , , , , , , , , , , , , , ,

Monday, April 20, 2009

RDFj: Semantic objects in JSON

"Essentially, what we've done with RDFj is to map JSON to RDF -- with a few extra tweaks thrown in -- rather than simply mapping RDF to JSON. (RDFa took the same approach, starting with HTML, and then working out what RDF various patterns might represent.)

"There are of course many uses for the straightforward serialisation approach, taken by RDF/JSON. But we're finding that as our applications increasingly use both JavaScript and RDF, it's very useful to blur the lines between the two. RDFj takes us an important step towards that."


Read more at RDFj: Semantic objects in JSON on my webBackplane blog.

Labels: , , , , , , , , , , , ,

Saturday, April 18, 2009

Update to 'Getting started with RDFa: Creating a basic FOAF profile'

Just over a year ago I wrote a blog post that showed how to create a FOAF profile on a web page, using RDFa. The idea was not only to show how easy it was to do in terms of the markup, but also to illustrate that once you are able to publish RDF via a web page, you need nothing more than a blog page to join the semantic web.

This blog post updates that old post, by first adding some guidance on how to check your document (using the Ubiquity RDFa parser), and then proceeding to add more features to your blog page.

Read more at Getting started with RDFa: Creating a basic FOAF profile, on my webBackplane.com blog.

Labels: , , , , , , , , , , , , , ,

Friday, March 20, 2009

Customising initial instance data in an xform

One of our customers recently asked:

"I have a question on how we can open an XForms page from a non-XForms page. We are trying to have a summary page which is a non-XForm page and we would like to try to open an already existing XForms page by populating data on to it dynamically, by clicking on a component in the summary page. More like a summary-to-detail functionality....

We are trying to find the best way to do this."


It's an interesting question, and although we have worked out a couple of ways of looking at this on the client side, I thought the best answer for now was to user the server.

Read more in Customising initial instance data in an xform, on my webBackplane blog.

Labels: ,

Tuesday, February 03, 2009

Duck-typing and XForms

In a recent code review on the Ubiquity XForms project, the question of whether to test for an element by name or properties came up. In this post we look at the benefits that can be had from using duck-typing as a way to manage objects' functionality, rather than the more usual hierarchical solutions.

Read more in Duck-typing and XForms, on my webBackplane blog.

Labels: , , , , ,

Friday, November 07, 2008

Compact HTML: A mark-up language for micro-blogging

This post also appears on Mark Birbeck's webBackplane blog.

When sending small comments via services such as Twitter, it's pretty straightforward to add links to other documents. The general pattern is to abbreviate the link using an online service, and then paste the shortened link into your post. Software that displays your posts can then replace any string that begins with http: with a real link.

However, there are many occasions where a link is just not good enough. Sometimes you'd like to embed an image, or even a video. But if we start trying to add HTML mark-up, we'll pretty soon hit the character limit imposed by micro-blogging platforms.

Enter compact HTML, or CHTML...for short.

Compact HTML

The simple idea of CHTML is that we use keywords to indicate the mark-up. For example, to add an image you would ordinarily write:
<img src="http://www.fineart.ac.uk/images/works/Dundee/90/du0008.jpg" />
Which would give you this:



Of course, we can shorten the fragment by using a URL service:
<img src="http://snurl.com/252rj" />


But we can go further if we make the mark-up compact:
img=http://snurl.com/252rj
That's a pretty efficient way to transmit an image in a post.

Why HTML?

You could ask how this relates to HTML?

The idea is that all elements and attributes from HTML can be used in a generic way. So the full version of the image we just saw, would actually be:
img(src=http://snurl.com/252rj)
We could also write:
img(src=http://snurl.com/252rj,alt=A picture of Stooky Bill)

Each element would have a 'default attribute' that anonymous values would set. In the case of img it would obviously be @src, so:
img=http://snurl.com/252rj
is equivalent to:
img(src=http://snurl.com/252rj)

Other tokens


Since all we're really doing is looking for patterns of the form:
token=value
then we needn't limit ourselves to HTML in our compact mark-up.

For example, we could express a YouTube video like this:
tube=http://snurl.com/25300

An example

To see this in action, take a look at the Compact HTML Twitter sample from the Ubiquity RDFa library. Note how two tweets from Stooky Bill are shown, one containing an image, and one containing a video. As you can see from Stooky's Twitter page, the actual tweets contain simple Compact HTML.

Labels: , , , ,