diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2020-05-24 17:02:12 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-26 11:33:10 -0700 |
commit | c924591f463cc0cc2cc3157abc724920e9eb4209 (patch) | |
tree | 0028c90d3a2c7b1ff3a518cc58e9b71fdce043ba /xslt/subsurfacecsv.xslt | |
parent | 75f3cb20272039a9651ff415a97f0f69946877c3 (diff) | |
download | subsurface-c924591f463cc0cc2cc3157abc724920e9eb4209.tar.gz |
CSV import: add SAC if we end up supporting it
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt/subsurfacecsv.xslt')
-rw-r--r-- | xslt/subsurfacecsv.xslt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xslt/subsurfacecsv.xslt b/xslt/subsurfacecsv.xslt index 0d3a32425..dbc579c62 100644 --- a/xslt/subsurfacecsv.xslt +++ b/xslt/subsurfacecsv.xslt @@ -93,6 +93,24 @@ </xsl:call-template> </xsl:attribute> + <!-- If reading of SAC is added at some point, it is already available in our own CSV import --> + <xsl:variable name="sac"> + <xsl:call-template name="getFieldByIndex"> + <xsl:with-param name="index" select="4"/> + <xsl:with-param name="line" select="$line"/> + </xsl:call-template> + </xsl:variable> + <xsl:attribute name="sac"> + <xsl:choose> + <xsl:when test="$units = 1"> + <xsl:value-of select="format-number($sac * 0.035315, '#.##')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$sac"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:attribute name="tags"> <xsl:call-template name="getFieldByIndex"> <xsl:with-param name="index" select="22"/> |