CALICO - last day (Saturday). All G&T.
May 21, 2011
CALICO catch-up - hours put in this week (Mon-Thur).
No comment.
May 20, 2011
A quick way to select a series of elements in an XSL transformation
for-each-group, in case something like XPath's distinct-values function isn't sufficient (for example, when you want to group a series of elements by a certain value but you still want to access all of the other nodes in the elements):
<?xml version="1.0" encoding="UTF-8"?>
<markers xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0">
<xsl:for-each-group select=".//tei:teiHeader" group-by=".//tei:nationality/text()">
<xsl:variable name="nationality" select=".//tei:nationality/text()"/>
<xsl:variable name="geotags" select="normalize-space(.//tei:geo/text())"/>
<xsl:variable name="lat" select="substring-before($geotags, ' ')"/>
<xsl:variable name="lng" select="substring-after($geotags, ' ')"/>
<xsl:element name="marker">
<xsl:attribute name="name" select="$nationality"/>
<xsl:attribute name="address" select="$nationality"/>
<xsl:attribute name="lat" select="$lat"/>
<xsl:attribute name="lng" select="$lng"/>
</xsl:element>
</xsl:for-each-group>
</markers>
Since submissions with apostrophes were breaking the teacher registration form ( http://www.canadianmysteries.ca/teachers/login/indexen.php ) - for example, "Queen's University" - I added a loop that passes all of the POST variables through
mysql_real_escape_string before inserting into the DB.May 19, 2011
Conference. Tech support. Nuff said.
Added <geo> elements containing latitude and longitude for all the videos so that they can be efficiently mapped without having to resort to on-the-fly geotagging. As per the TEI schema I used the <geoDecl> element within <encodingDesc>.
To look up the latitude and longitude of each location, I used this tool: http://universimmedia.pagesperso-orange.fr/geo/loc.htm
Had to change includes/xslt/player.xsl to use the new "trait" element instead of "persTrait".
The FrancoToile RNG schema needs to be updated to include latitude and longitude information, so I generated a new schema from the TEI Roma application ( http://www.tei-c.org/Roma/ ). It turns out that a small handful of the conventions used in the FrancoToile data files are no longer valid, namely:
date/@value is now date/@when
persTrait is now trait
dateline needs to be within a closer element
So, I've fixed these issues in the data files, which now valid against the new schema. And, now that the schema contains support for latitude/longitude, those values can be added.
Heard from SD the other day, who is back from Britain. He's going to re-proof the 1800s data. His hopeful plan is to have all data from 1714-1810 in order by the end of the summer. As long as the new data looks roughly the same as the data we've already received, this shouldn't be a problem on our end.