Thursday, 22 March 2007

Timeline workshop

SIMILE timeline is a JavaScript module which provides an API with which a programmer can create a display of a set of events defined in an XML file.


  1. Work through the tutorial, creating a simple timeline as far as the section on Differentiating the Two Bands
  2. Create a new xml file of events in the required format which represents the University calendar or some other set of events

Wednesday, 21 March 2007

Week 21 - Revision

There will be a lecture this Friday to help you prepare your revision over Easter. We will look at the exam structure and last year's paper. I also want to gather your thoughts on topics which would benefit from additional revision material to present after Easter, although we still have material to cover after Easter.

The workshop will be on the representation of time using the tutorial on the SIMILE timeline project. Think of this as a GoogleEarth of time.

Tuesday, 20 March 2007

Multiple nodes in PHP

Several of you have asked about looping round elements in XML. This is obviously desirable because, although only six places are asked for in the data, the code should not have to change when a new place is added.

Heres how to do it - [Caution - this code is unchecked]

//assume places.xml contains multiple places, each with a name and description

$placesxml = simplexml_load_file("places.xml");

$places = $placesxml->xpath("//Place");

// $places is now an array of XML elements, each a Place element

foreach ($places as $place) {

//$place now points to each Place in the XML document in turn
// so we can use object references to access the elements within a Place

print $place->name, $place->description;

// or even XPath expression as well

// and of course, if the are repeated elements in Place, such Link, with elements
//url and text, we can use a inner loop to work with these

foreach( $place->Link as $link) {
print "<a href='$link->url'/>$link->text</a>"

Wednesday, 14 March 2007

Week 20 - Sematic Web -16th of March

We are going to continue to look at the Semantic Web. This week we are going to look at this excellent introduction to the Semantic Web, Schema Languages and Ontology Languages. Then, for self-study, read the section on RDF Schema in the RDF primer that I gave out last week.

Further reading - see the links for last week.

Sunday, 4 March 2007

Week 19 - RDF - 9th of March

In the next two weeks we are going to looking at RDF and RDF Schema languages. We will be reading the RDF primer so please take a look at this document.

See also a short set of slides and the handout for the session.

Further reading: