Dive computer import improvements

Parse dive computer information or divelog generator information and
include it as divecomputerid and divecomputer as appropriate.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2013-03-02 13:10:38 +02:00 committed by Dirk Hohndel
parent e89c2fd656
commit aa02798e2a
3 changed files with 43 additions and 19 deletions

View file

@ -23,12 +23,12 @@
<xsl:template match="generator|u:generator">
<xsl:if test="manufacturer/name|u:manufacturer/u:name != ''">
<xsl:attribute name="model">
<xsl:value-of select="manufacturer/name|/u:manufacturer/u:name"/>
<xsl:value-of select="name|u:name"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="name|u:name != ''">
<xsl:attribute name="firmware">
<xsl:value-of select="name|u:name"/>
<xsl:value-of select="manufacturer/name|/u:manufacturer/u:name"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="version|u:version != ''">
@ -92,6 +92,12 @@
</temperature>
</xsl:for-each>
<divecomputer deviceid="ffffffff">
<xsl:attribute name="model">
<xsl:value-of select="/uddf/generator/name|/u:uddf/u:generator/u:name"/>
</xsl:attribute>
</divecomputer>
<xsl:apply-templates select="/uddf/gasdefinitions|/u:uddf/u:gasdefinitions"/>
<depth>
<xsl:for-each select="greatestdepth|informationafterdive/greatestdepth|u:greatestdepth|u:informationafterdive/u:greatestdepth">