diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2020-05-24 17:22:36 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-26 11:33:10 -0700 |
commit | a41a8c106519e627f2bb08cabb502a71326b5d57 (patch) | |
tree | cbd161737ab58ef9dab85b4f938cb2a837dfa12f /xslt | |
parent | c924591f463cc0cc2cc3157abc724920e9eb4209 (diff) | |
download | subsurface-a41a8c106519e627f2bb08cabb502a71326b5d57.tar.gz |
Fix field indexes after dive mode and sac change
We need to update field numbers when parsing CSV, as recently sac and
dive mode were added.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/subsurfacecsv.xslt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xslt/subsurfacecsv.xslt b/xslt/subsurfacecsv.xslt index dbc579c62..1aed0e9b2 100644 --- a/xslt/subsurfacecsv.xslt +++ b/xslt/subsurfacecsv.xslt @@ -113,14 +113,14 @@ <xsl:attribute name="tags"> <xsl:call-template name="getFieldByIndex"> - <xsl:with-param name="index" select="22"/> + <xsl:with-param name="index" select="24 + ($cylinders - 1) * 5"/> <xsl:with-param name="line" select="$line"/> </xsl:call-template> </xsl:attribute> <xsl:variable name="rating"> <xsl:call-template name="getFieldByIndex"> - <xsl:with-param name="index" select="18"/> + <xsl:with-param name="index" select="20 + ($cylinders - 1) * 5"/> <xsl:with-param name="line" select="$line"/> </xsl:call-template> </xsl:variable> @@ -132,7 +132,7 @@ <xsl:variable name="visibility"> <xsl:call-template name="getFieldByIndex"> - <xsl:with-param name="index" select="19"/> + <xsl:with-param name="index" select="21 + ($cylinders - 1) * 5"/> <xsl:with-param name="line" select="$line"/> </xsl:call-template> </xsl:variable> @@ -147,13 +147,13 @@ <depth> <xsl:variable name="max"> <xsl:call-template name="getFieldByIndex"> - <xsl:with-param name="index" select="4"/> + <xsl:with-param name="index" select="5"/> <xsl:with-param name="line" select="$line"/> </xsl:call-template> </xsl:variable> <xsl:variable name="mean"> <xsl:call-template name="getFieldByIndex"> - <xsl:with-param name="index" select="5"/> + <xsl:with-param name="index" select="6"/> <xsl:with-param name="line" select="$line"/> </xsl:call-template> </xsl:variable> @@ -186,13 +186,13 @@ <divetemperature> <xsl:variable name="air"> <xsl:call-template name="getFieldByIndex"> - <xsl:with-param name="index" select="6"/> + <xsl:with-param name="index" select="8"/> <xsl:with-param name="line" select="$line"/> </xsl:call-template> </xsl:variable> <xsl:variable name="water"> <xsl:call-template name="getFieldByIndex"> - <xsl:with-param name="index" select="7"/> + <xsl:with-param name="index" select="9"/> <xsl:with-param name="line" select="$line"/> </xsl:call-template> </xsl:variable> |