Let's use the same assumption for working pressure (where not defined) as the origin uses.
Signed-off-by: Miika Turkia <[email protected]> --- xslt/divelogs-export.xslt | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt index b97b5fb..abfcc89 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> -- 2.1.4 _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
