mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Added support for UDDf version 3.1
This adds support for UDDF version 3.1 as produced by at least DiversDiary. Basically we have to include the different name space into our selections. This patch also checks if the temperature is zero on all samples and skips temperature readings if it looks like the dive computer does not record them. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9b35381cf2
commit
6a98588ed0
2 changed files with 67 additions and 41 deletions
|
@ -131,4 +131,20 @@
|
|||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Trying to see if we have temperature readings -->
|
||||
<xsl:template name="temperatureSamples">
|
||||
<xsl:param name="units"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$units = 'Imperial'">
|
||||
<xsl:value-of select="count(descendant::temperature[. != 32])"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$units = 'Kelvin'">
|
||||
<xsl:value-of select="count(descendant::temperature[. != 273.15])"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="count(descendant::temperature[. != 0])"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue