diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-09-24 16:55:37 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-24 07:11:18 -0700 |
commit | f5b17f2d297ea99a7b99e690263c0d9163ef42ce (patch) | |
tree | e429e3f9ff3ba60d12a93bb9c502142da0fe190e | |
parent | 24471cfd0d71bab82e6e4ded68e593abdea9bb30 (diff) | |
download | subsurface-f5b17f2d297ea99a7b99e690263c0d9163ef42ce.tar.gz |
Divelogs.de import: set default working pressure
Let's use the same assumption for working pressure (where not defined)
as the origin uses.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | xslt/divelogs-export.xslt | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt index b97b5fbcc..abfcc8980 100644 --- a/xslt/divelogs-export.xslt +++ b/xslt/divelogs-export.xslt @@ -114,11 +114,16 @@ </xsl:otherwise> </xsl:choose> </CYLINDERENDPRESSURE> - <xsl:if test="cylinder[position() = $cylinder]/@workpressure != ''"> - <WORKINGPRESSURE> - <xsl:value-of select="substring-before(cylinder[position() = $cylinder]/@workpressure, ' ')"/> - </WORKINGPRESSURE> - </xsl:if> + <xsl:choose> + <xsl:when test="cylinder[position() = $cylinder]/@workpressure != ''"> + <WORKINGPRESSURE> + <xsl:value-of select="substring-before(cylinder[position() = $cylinder]/@workpressure, ' ')"/> + </WORKINGPRESSURE> + </xsl:when> + <xsl:otherwise> + <WORKINGPRESSURE>198</WORKINGPRESSURE> + </xsl:otherwise> + </xsl:choose> <ADDITIONALTANKS> <xsl:for-each select="cylinder[position() != $cylinder]"> @@ -164,11 +169,16 @@ <CYLINDERENDPRESSURE> <xsl:value-of select="@end"/> </CYLINDERENDPRESSURE> - <xsl:if test="@workpressure != ''"> - <WORKINGPRESSURE> - <xsl:value-of select="substring-before(@workpressure, ' ')"/> - </WORKINGPRESSURE> - </xsl:if> + <xsl:choose> + <xsl:when test="@workpressure != ''"> + <WORKINGPRESSURE> + <xsl:value-of select="substring-before(@workpressure, ' ')"/> + </WORKINGPRESSURE> + </xsl:when> + <xsl:otherwise> + <WORKINGPRESSURE>198</WORKINGPRESSURE> + </xsl:otherwise> + </xsl:choose> <O2PCT> <xsl:value-of select="substring-before(@o2, '%')"/> </O2PCT> |