diff options
author | Anton Lundin <glance@acc.umu.se> | 2013-11-25 23:06:00 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-25 14:46:53 -0800 |
commit | 5e04aaa75664ecc5525d2d0a7bbd8b96d97c3b35 (patch) | |
tree | ea10e16645e2c0b35991017a12cd330e19d0efed /xslt | |
parent | eec732548b9f5d8cf792c896fa3a66f1db1043f2 (diff) | |
download | subsurface-5e04aaa75664ecc5525d2d0a7bbd8b96d97c3b35.tar.gz |
Add the missed csv-field stopdepth
I managed to mess up and grab parts of my unfinished otu field code and
squash it into the wrong patch. Here is the code for stopdepth, and now
the code sets the in_deco flag to.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/csv2xml.xslt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index 07aa91d55..8017c4599 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -8,6 +8,7 @@ <xsl:param name="po2Field" select="po2Field"/> <xsl:param name="cnsField" select="cnsField"/> <xsl:param name="otuField" select="otuField"/> + <xsl:param name="stopdepthField" select="stopdepthField"/> <xsl:param name="date" select="date"/> <xsl:param name="time" select="time"/> <xsl:output method="xml" indent="yes"/> @@ -141,6 +142,25 @@ </xsl:when> </xsl:choose> </xsl:attribute> + + <xsl:if test="$stopdepthField >= 0"> + <xsl:variable name="stopdepth"> + <xsl:call-template name="getFieldByIndex"> + <xsl:with-param name="index" select="$stopdepthField"/> + <xsl:with-param name="line" select="$line"/> + </xsl:call-template> + </xsl:variable> + <xsl:attribute name="stopdepth"> + <xsl:copy-of select="$stopdepth"/> + </xsl:attribute> + + <xsl:attribute name="in_deco"> + <xsl:choose> + <xsl:when test="$stopdepth > 0">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> </sample> </xsl:if> </xsl:template> |