aboutsummaryrefslogtreecommitdiffstats
path: root/xslt/csv2xml.xslt
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-06-27 23:38:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-27 14:43:04 -0700
commit4867363ec573f15326110f9affea1e7c046efed7 (patch)
treeb2a78a8f78e2ad94cda1ac377f1c0f73682702c2 /xslt/csv2xml.xslt
parentf04b3bc166fe714f810a90dcd606db60dc7bc900 (diff)
downloadsubsurface-4867363ec573f15326110f9affea1e7c046efed7.tar.gz
Move model tagging to xslt
Instead of replacing all the empty model tags after a csv to xml transform with some text, just produce that text in the csv to xml transform instead. 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.xslt13
1 files changed, 7 insertions, 6 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index 29ebbce24..b3dbc7a8d 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -42,12 +42,13 @@
<xsl:attribute name="time">
<xsl:value-of select="concat(substring($time, 2, 2), ':', substring($time, 4, 2))"/>
</xsl:attribute>
- <divecomputerid deviceid="ffffffff" model="csv" />
- <xsl:call-template name="printLine">
- <xsl:with-param name="line" select="substring-before(//csv, $lf)"/>
- <xsl:with-param name="lineno" select="'1'"/>
- <xsl:with-param name="remaining" select="substring-after(//csv, $lf)"/>
- </xsl:call-template>
+ <divecomputer model="Imported from CSV" deviceid="ffffffff">
+ <xsl:call-template name="printLine">
+ <xsl:with-param name="line" select="substring-before(//csv, $lf)"/>
+ <xsl:with-param name="lineno" select="'1'"/>
+ <xsl:with-param name="remaining" select="substring-after(//csv, $lf)"/>
+ </xsl:call-template>
+ </divecomputer>
</dive>
</dives>
</divelog>