summaryrefslogtreecommitdiffstats
path: root/xslt/csv2xml.xslt
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-11-21 23:48:41 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-21 15:54:21 -0800
commit5eccd73a306298616da122ba4e653d4c8f391df8 (patch)
tree61e85992f9863bdd2f4913dd8c840c99cd88c5a9 /xslt/csv2xml.xslt
parent8dde12fa35e0e53f93efef8a99a7fe2e625e901c (diff)
downloadsubsurface-5eccd73a306298616da122ba4e653d4c8f391df8.tar.gz
Add optional support for cns import from csv files
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/csv2xml.xslt')
-rw-r--r--xslt/csv2xml.xslt12
1 files changed, 12 insertions, 0 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index 6a72ffa17..382bb2be6 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -6,6 +6,7 @@
<xsl:param name="depthField" select="depthField"/>
<xsl:param name="tempField" select="tempField"/>
<xsl:param name="po2Field" select="po2Field"/>
+ <xsl:param name="cnsField" select="cnsField"/>
<xsl:param name="date" select="date"/>
<xsl:param name="time" select="time"/>
<xsl:output method="xml" indent="yes"/>
@@ -117,6 +118,17 @@
</xsl:when>
</xsl:choose>
</xsl:attribute>
+
+ <xsl:attribute name="cns">
+ <xsl:choose>
+ <xsl:when test="$cnsField >= 0">
+ <xsl:call-template name="getFieldByIndex">
+ <xsl:with-param name="index" select="$cnsField"/>
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
</sample>
</xsl:if>
</xsl:template>