Case insensitive string comparison for units

Not really surprising, but a sample log that I received used different
case for unit than I had expected.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2018-02-15 06:28:21 +02:00 committed by mturkia
parent f8360eeddd
commit 006e00ebc4

View file

@ -33,7 +33,7 @@
<xsl:template match="DIVE|dive">
<xsl:variable name="units">
<xsl:choose>
<xsl:when test="//units|//UNITS = 'imperial'">
<xsl:when test="translate(//units|//UNITS, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'imperial'">
<xsl:value-of select="'Imperial'"/>
</xsl:when>
<xsl:otherwise>