mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:03:23 +00:00
Divelogs.de import empty value fix
This checks that weight and dive durantion are defined before importing. (Empty value concatenated with unit gives an error on import.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
dcad3af8b6
commit
ff1c33401b
1 changed files with 15 additions and 11 deletions
|
@ -25,9 +25,11 @@
|
|||
<xsl:attribute name="time">
|
||||
<xsl:value-of select="TIME"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="duration">
|
||||
<xsl:value-of select="concat(floor(number(DIVETIMESEC) div 60), ':', format-number(floor(number(DIVETIMESEC) mod 60), '00'), ' min')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="DIVETIMESEC != ''">
|
||||
<xsl:attribute name="duration">
|
||||
<xsl:value-of select="concat(floor(number(DIVETIMESEC) div 60), ':', format-number(floor(number(DIVETIMESEC) mod 60), '00'), ' min')"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<depth>
|
||||
<xsl:if test="MAXDEPTH != ''">
|
||||
|
@ -105,14 +107,16 @@
|
|||
</xsl:attribute>
|
||||
</cylinder>
|
||||
|
||||
<weightsystem>
|
||||
<xsl:attribute name="description">
|
||||
<xsl:value-of select="'unknown'"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="weight">
|
||||
<xsl:value-of select="concat(WEIGHT, ' kg')"/>
|
||||
</xsl:attribute>
|
||||
</weightsystem>
|
||||
<xsl:if test="WEIGHT != ''">
|
||||
<weightsystem>
|
||||
<xsl:attribute name="description">
|
||||
<xsl:value-of select="'unknown'"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="weight">
|
||||
<xsl:value-of select="concat(WEIGHT, ' kg')"/>
|
||||
</xsl:attribute>
|
||||
</weightsystem>
|
||||
</xsl:if>
|
||||
|
||||
<notes>
|
||||
<xsl:value-of select="LOGNOTES"/>
|
||||
|
|
Loading…
Add table
Reference in a new issue