aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2018-05-27 08:26:14 +0300
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-05-27 23:18:01 +0300
commit4e2a7b4e2fc8a52821be4d870789e2f204e00e0d (patch)
tree83a603c93c0e1ac3df2d3db9c4098c790c3ee7d4 /xslt
parent308e079ad6414152fe72ba0784582734d6801b75 (diff)
downloadsubsurface-4e2a7b4e2fc8a52821be4d870789e2f204e00e0d.tar.gz
Shearwater import: new format for DC info
Include the DC info into settings and refer to that in each dive. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/shearwater.xslt15
1 files changed, 12 insertions, 3 deletions
diff --git a/xslt/shearwater.xslt b/xslt/shearwater.xslt
index 4a3884b40..bcd7b58bd 100644
--- a/xslt/shearwater.xslt
+++ b/xslt/shearwater.xslt
@@ -7,6 +7,18 @@
<xsl:template match="/">
<divelog program='subsurface-import' version='2'>
+ <settings>
+ <xsl:for-each select="/dive/diveLog">
+ <divecomputerid deviceid="{computerSerial}">
+ <xsl:attribute name="model">
+ <xsl:value-of select="'Shearwater'" />
+ </xsl:attribute>
+ <xsl:attribute name="serial">
+ <xsl:value-of select="computerSerial" />
+ </xsl:attribute>
+ </divecomputerid>
+ </xsl:for-each>
+ </settings>
<dives>
<xsl:apply-templates select="/dive/diveLog"/>
</dives>
@@ -86,9 +98,6 @@
</xsl:for-each>
<divecomputer>
- <xsl:attribute name="model">
- <xsl:value-of select="'Shearwater'"/>
- </xsl:attribute>
<xsl:attribute name="deviceid">
<xsl:value-of select="computerSerial"/>
</xsl:attribute>