mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
UDCF import: use unit variable
Simplify depth conversion from by using the unit variable and allowing dephtConvert template to do the work. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
38ac965989
commit
5b422332ac
1 changed files with 12 additions and 36 deletions
|
@ -136,24 +136,12 @@
|
|||
format-number(floor($timeSec mod $timeconvert), '00'), ' min')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="depth">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//units|//UNITS = 'imperial'">
|
||||
<xsl:call-template name="depthConvert">
|
||||
<xsl:with-param name="depth">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="units" select="'Imperial'"/>
|
||||
<xsl:with-param name="units" select="$units"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="depthConvert">
|
||||
<xsl:with-param name="depth">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="units" select="'Metric'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</sample>
|
||||
</xsl:for-each>
|
||||
|
@ -189,24 +177,12 @@
|
|||
format-number(floor($timeSec mod 60), '00'), ' min')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="depth">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//units|//UNITS = 'imperial'">
|
||||
<xsl:call-template name="depthConvert">
|
||||
<xsl:with-param name="depth">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="units" select="'Imperial'"/>
|
||||
<xsl:with-param name="units" select="$units"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="depthConvert">
|
||||
<xsl:with-param name="depth">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="units" select="'Metric'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</sample>
|
||||
</xsl:for-each>
|
||||
|
|
Loading…
Add table
Reference in a new issue