The website is located at: http://pear.hcmc.uvic.ca:8081/lansdowne/site/index.xql
the Lansdowne app lives in the webapps-dev directory on Pear.
To connect to the database: see the documentation ODT.
The Website
The website is a feature-complete, sparse prototype. The site is based on a version of the FrancoToile site, albeit without a lot of the FrancoToile features such as multi-language support.
Pages
Home and About: these are two simple pages that simply display static content.
Browse: grabs a list of movies from the collection, and simply loops over and formats them into an unordered list.
Search: Upon form submission, an XPath statement is dynamically built from the options selected by the user.
The comment in the search.xql script explaining how the results are parsed and formatted:
Search for videos using the XPath filters constructed above. Because the filters are constructed dynamically and stored as an xs:string, we need to use util:eval to grab the collection because the collection() function doesn't accept variables, just a hard string for an argument.
The search uses the eXist KWIC ('keywords in content') module to parse search results:
http://demo.exist-db.org/exist/functions/kwic
Each result in the initial for ... in loop is expanded with kwic:expand(), which formats the query results and turns them into organized search hits. Then, the kwic:get-summary() function is executed on each record in the search result. This returns a <p> element with three child <span> elements: the hit itself, and the chunks of text that come before and after the hit. These results are output as a list element.
The Transcripts and Incidents
The most interesting part of the site – and the only part that differs from, or goes beyond, FrancoToile – is the incident or 'event' support. While the FrancoToile site displays the transcript – that is, tei:u (utterance) elements in the data – corresponding to the time of the video, the Lansdowne player also displays 'incidents', which are extra sets of information in the tei:body element of a data file. On the public-facing website, these incidents are called events. Gbua1.xml has an 'incident' set that looks like this:
<div type="incidents" xml:id="slideIncidents">
<div xml:lang="en" type="lang">
<head>Slides</head>
<incident start="gbua1s0" end="gbua1s1">
<desc>slide 1 - <ref target="http://en.wikipedia.org/wiki/Archivo_General_de_Indias">Archives of the Indies and Seville</ref>
</desc>
</incident>
<incident start="gbua1s1" end="gbua1s2">
<desc>slide 2 - Arial view of the Rio Belen, Panama</desc>
</incident>
<incident start="gbua1s2" end="gbua1s3">
<desc>slide 3 - People using a <ref target="http://en.wikipedia.org/wiki/Magnetometer">magnetometer</ref> on the beach in <ref target="http://maps.google.com/maps?f=q&hl=en&q=Jamaica&ll=18.442973,-77.198009&spn=0.113828,0.190716&t=k">St. Anne's Bay, Jamaica</ref>
</desc>
</incident>
<incident start="gbua1s3" end="gbua1s4">
<desc>slide 4 - Researchers examining seabed core samples</desc>
</incident>Default
<incident start="gbua1s4" end="gbua1s5">
<desc>slide 5 - Underwater photo of a Byzantine wreck</desc>
</incident>
<incident start="gbua1s5" end="gbua1s6">
<desc>slide 6 - Turkish sponge diver standing on the deck of a boat</desc>
</incident>
</div>
</div>
Each incident's @start and @end must correspond to a timeline/when element, just like an utterance.
To make a series of events appear on the player page, one need only add the XML markup like above. Each series of events (that is, div type=”incidents”) will automatically be loaded into the page via an XSLT transformation using xslt/incidents.xsl. The full transcript of each event series will appear in the “Events” tab of the player, while the individual incidents themselves will appear below the movie at the appropriate time as defined in the timeline.
What's to be done now?
Without much data, it's tough to say what kind of changes and improvements this website needs. It's feature-complete for now, but undoubtedly will require some expansion if a full suite of data is ever added. For example, the 'browse' page could probably use pagination and sorting options, the player page may need to display the events/incidents with more bells and whistles, and so on.