October 28, 2010 at 1:46 pm · Filed under Web Services
In this tutorial you will learn how to find Web Service feeds and you will get to transform them into a list of results formatted with the colour and font of your choice. I have prepared a set of PHP files for the Web Service Transformer that will help me demonstrate the power of XML. If you want to continue to work with this I have published them under a creative commons license allowing you to use and make changes to them.

This software is licensed under the CC-GNU GPL version 2.0 or later.
First let’s have a look at the Web Service Transformation interface. This is a simple form which allows you to submit some parameters that will determine the outcome of the list.
The first parameter is Web Service. For this parameter you need to find a XML feed. Here are some places you can go to find these feeds:

The second parameter is Tag. If we use the example from the Flickr API again we can use the Flickr URL for the method flickr.photosets.getPhotos calling the photoset with the ID = 72157622862470902
The photo-set id can be found in the URL when you look at the photoset on Flickr. The same goes for photos and collections. For group ID and Flickr User ID you can use the idGettr tool where you copy/paste the URL and it gives you the ID.

http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=a8ee0e80254383b35779042d3fadb5d6&photoset_id=72157622862470902&privacy_filter=1&api_sig=4b60ccfb80deb813f72f36c440cb8286
If we input this URL into the interface and check the Print XML only box we will see the XML returned. From this XML we can pick out a tag to use e.g. <photo>

The third parameter is Attribute which allows you to choose an attribute from the tag you chose earlier. In this case I will choose title. Note that this parameter is optional.
The fourth parameter is Colour – have a look at COLOURlover for inspiration.
The fifth parameter is Font – have a look at Larabie‘s fonts for inspiration (you can also see the fonts here)

The parameters input are used to build an XSLT (eXtensible Stylesheet Language Transformation) file which transforms the XML from the Web Service into HTML in the colour and font you chose.
Your turn
- Use Flickr Explorer to display a description of a photo from the Vindolanda Fort at Hadrian’s Wall in a red shade and a font beginning with ‘G’
- Use Flickr Explorer to display the amount of members in the flickr group ‘Roman Empire’ in a shade of blue and a font beginning with ‘B’
- Using APPELLO for the Vindolanda tablets display a list of geographical places with the letter ‘b’ in the name in a green shade and a font of your choosing
- Using APPELLO for the Vindolanda tablets display a list of people named ‘flauius’ each with the tablets they occur in listed below the name in a purple shade and a font of your choosing
- Using the Baby Name API display your own name in your favorite colour and a font that begins with the same letter as your name
October 25, 2010 at 11:53 am · Filed under Web Services
I am once again doing a lecture on the wonder of XML for the Digital Resources in Humanities course at UCL. The lecture is called: ‘Wow, it’s XML! and this post is an update of the post from last years class.
You should also have a look at the post on using the Flickr API and of course the post where the photos themselves are displayed with the help of SimpleViewer.
Essential Websites
eSAD – e-Science and Ancient Documents: http://esad.classics.ox.ac.uk
Vindolanda – http://www.vindolanda.com
VTO – Vindolanda Tablets Online: http://vindolanda.csad.ox.ac.uk/
VTO2 – Vindolanda Tablets Online II: http://vto2.csad.ox.ac.uk/
EpiDoc – Epigraphical Documents in TEI: http://epidoc.sourceforge.net
Contextual encoding
Hippisley, D. (2005) “Encoding the Vindolanda tablets: an investigation in contextual encoding using XML and the EpiDoc standards.” MA Dissertation submitted for the MA in Electronic Communication and Publishing, School of Library, Archive and Information Studies, UCL.
RESTful Web Services
Abeysinghe, S. 2008. RESTful PHP Web Services, Birmingham: PACKT Publishing
Fielding, R. T. 2000. Architecture Styles and the Design of Network-based Software Architectures,
Richardson, L. and Ruby, S. 2007. RESTful Web Services, Cambridge: O’Reilly
Spies, B. 2008. Web Services, Part 1: SOAP vs. RESThttp://ajaxonomy.com/2008/xml/web-services-part-1-soap-vs-rest (25.11.09)
Some of these publications are available via the eSAD website
Roued-Cunliffe, H. 2010. Towards a Decision Support System for Reading Ancient Documents, Literary and Linguistics Computing, doi: 10.1093/llc/fqq020
Olsen, H. R. , Tarte, S. , Terras, M. , Brady, M. and Bowman, A. K. 2009. Towards an Interpretation Support System for Reading Ancient Documents, Digital Humanities Conference 2009
Tarte, S. 2010. Papyroligical Investigations: Transferring Perception and Interpretation into the Digital World, Literary and Linguistics Computing – forthcoming,
Tarte, S. , Brady, M. , Olsen, H. R. , Terras, M. and Bowman, A. K. 2008c. Image acquisition & analysis to enhance the legibility of ancient texts, E-Science All Hands Meeting 2008
Terras, M. 2006. Image to Interpretation. An Intelligent System to Aid Historians in Reading the Vindolanda Texts, Oxford University Press
WordPress plugins
SimpleFlickr
October 25, 2010 at 11:47 am · Filed under Web Services
May 19, 2010 at 12:09 pm · Filed under Uncategorized
Having worked for quite a while on creating the new VTO2 website I sent it around a while ago to my supervisors to see what they thought. Imagine my disappointment when one of them replied that they couldn’t get the fancy AJAX (Asynchronous Javascript And XML) search engine to work. I double checked everything and couldn’t for the life of me figure out why it wasn’t working on her machine. I don’t remember how I realised it but it became apparent that when she had typed a search pattern in she then pressed ‘enter’ / ‘return’. This was bit of a ‘duh’ moment for me. I had myself been so fascinated by the AJAX LiveSearch abilities that I had managed to create that I hadn’t stopped to think that one of the first reactions most people will have to a search-box is most naturally to press ‘enter’.
So I searched the web far and wide and came up with no solution. I then decided to make sure that when ‘enter’ submitted the form it just went back to the same page allowing the user to begin again. I then added a request below asking that the user did not press ‘enter’ while doing a search.
But then today while I was moving the whole website to a new (and yeah – much faster) server it struck me to search for “ajax deactivate enter”. Up came this post about “Disable form submit on enter keypress” written by Slobodan Kovacevic in 2005.
I did as he suggests and ‘hey presto’ it worked in Firefox, Safari and I presume IE (although I haven’t checked this yet). I was amazed because normally when I have small but very significant issues like that it takes ages to find the answer. But not this time.
May 12, 2010 at 1:36 pm · Filed under Events
The last couple of days the eSAD project have had our Colloquium on “e-Research on Texts and Images” at the British Academy, London.
Alejandro Giacometti, postgraduate student at UCL, has been summing up the talks!
This has been a very useful event for my research. As I am in the midst of writing up the chapter on the research and literature background leading up to my project I found many of the talks very enlightening.
I talked shortly about APPELLO (the word-search Web Service that I have been building recently) and Tom Elliot talked about how they are trying to make their resources and tools available and open. I was very interested in this, as it would be great to be able to use larger resources as knowledge bases for the Decision Support System. More on this later, I’m sure…