Week Beginning 29th October 2012

Back from my week off this week, with lots to do.  Whilst I was away Justin Livingstone of SCS got in touch with HATII about a project proposal related to David Livingstone.  Thankfully my colleagues in HATII were able to provide Justin with some helpful advice before his deadline, and I contacted Justin to offer my services if he needs them in future.

One of the pressing outstanding issues on my ‘to do’ list has been to fix the Scottish Corpus Advanced Search page, which is currently broken in the most recent versions of IE and also Chrome.  As I had received access to the server the week before my holiday and I had a Corpus meeting set up with Wendy, Jane and Marc this Thursday it seemed like a good time to tackle this issue.  I had been hoping that the problem would be a relatively simple Javascript issue but as I begin to delve into the code it became clear that solving the problem was going to be a larger undertaking.

The SCOTS advanced search page (http://www.scottishcorpus.ac.uk/corpus/search/advanced.php) allows a massive amount of customisation, with a range of display options for the results including a Google map, a concordance and a document list.  The page works by creating a query, feeding it to the database and generating an XML file from the database results.  This XML file, together with several XSLT files are then pulled into the user’s browser for processing using a Javascript plugin called Sarissa (http://sourceforge.net/projects/sarissa/).

Unfortunately it is this plugin that doesn’t work with Chrome and IE – see this test page: http://dev.abiss.gr/sarissa/test/testsarissa.html.  Sarissa is needed because different browsers have different processors for working with XML and XSLT files.  But although it set out to solve some of the incompatibility problems it has introduced others. These days it’s generally considered a bit messy to rely on client-side browsers to process XSLT – far better to process the XML using XSLT on the server and then use AJAX to pull in the transformed text from the server and display it.  This is what I set out to do with the advanced search page.

This has basically required me to rip out the heart of the advanced search page and build a new one.  This task has taken up most of the week, but I am just about ready to launch the new version.  It works in both Chrome and IE and handles all XSLT on the server side.  It also uses a JSON file for populating the Google Map as JSON is much easier to work with as a data source for Javascript compared to XML.  I’ve also introduced the Jquery Javascript library as it vastly simplifies the Javascript needed to work with page elements and AJAX.  I still need to add the ‘loading’ spinner to my new version of the advanced search and to properly test it but it should be possible to go live with this new version next week.

I had been hoping to work some more on the Open Corpus Workbench server this week, plus make a start on the STELLA applications but due to getting bogged down in the SCOTS advanced search both of these tasks will have to wait until next week.

I did manage to do some other tasks this week, however.  As mentioned earlier, I had a meeting with Wendy, Marc and Jane to discuss Corpora in general at the university.  This was a useful meeting and it was especially interesting to hear about the sound corpora that Jane is working with and the software her team are using (something called LabCat).  I’ll need to investigate this further.

Also this week I had a further meeting with Alison Wiggins regarding possible mobile and tablet versions of Bess of Hardwick.  We had a bit of a brainstorming session and came up with some possible ideas for the tablet version that could form the basis of a bid.  We also got in touch with Sheffield to ask about access to the server in order to develop a simple mobile interface to the existing site.  Although it won’t be possible for me to get access to the server directly, we reached an agreement whereby I will develop the interface around static HTML pages here in Glasgow and then I’ll send my updated interface to Sheffield for inclusion.

My final task of the week was to migrate the ‘Editing Robert Burns for the 21st Century’ website to a more official sounding URL.  I haven’t quite managed to complete this task yet but I’ll get it all sorted on Monday next week.

Leave a Reply

Your email address will not be published. Required fields are marked *