summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Martin Long <martin@longhome.co.uk>2015-02-11 21:20:54 +0000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-11 16:15:19 -0800
commit9b6c546244da65f9db3c7f153cd49fd9b35e1afe (patch)
tree35633e7f2e28f69de4b73e60d6858e6154474fc4 /xslt
parent60a7404ed4c79398c08a9d83d6575a3381c999a1 (diff)
downloadsubsurface-9b6c546244da65f9db3c7f153cd49fd9b35e1afe.tar.gz
UDDF Export: Moved tankdata before samples, as expected in xsd definition.
Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/uddf-export.xslt100
1 files changed, 50 insertions, 50 deletions
diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt
index d1d46a9b9..c3c1f35cc 100644
--- a/xslt/uddf-export.xslt
+++ b/xslt/uddf-export.xslt
@@ -284,6 +284,56 @@
</xsl:if>
</informationbeforedive>
+ <xsl:for-each select="cylinder">
+ <tankdata>
+ <link>
+ <xsl:attribute name="ref">
+ <xsl:choose>
+ <xsl:when test="@o2 != ''">
+ <xsl:value-of select="concat('mix', substring-before(@o2, '.'))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'mix21'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </link>
+
+ <xsl:if test="@size">
+
+ <tankvolume>
+ <xsl:value-of select="substring-before(@size, ' ')"/>
+ </tankvolume>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="@start">
+ <tankpressurebegin>
+ <xsl:value-of select="substring-before(@start, ' ') * 100000"/>
+ </tankpressurebegin>
+ </xsl:when>
+ <xsl:otherwise>
+ <tankpressurebegin>
+ <xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure]/@pressure[1], ' ') * 100000"/>
+ </tankpressurebegin>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="@end">
+ <tankpressureend>
+ <xsl:value-of select="substring-before(@end, ' ') * 100000"/>
+ </tankpressureend>
+ </xsl:when>
+ <xsl:otherwise>
+ <tankpressureend>
+ <xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') * 100000"/>
+ </tankpressureend>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </tankdata>
+ </xsl:for-each>
+
<samples>
<xsl:for-each select="divecomputer[1]/event | divecomputer[1]/sample">
@@ -483,56 +533,6 @@
</xsl:for-each>
</samples>
- <xsl:for-each select="cylinder">
- <tankdata>
- <link>
- <xsl:attribute name="ref">
- <xsl:choose>
- <xsl:when test="@o2 != ''">
- <xsl:value-of select="concat('mix', substring-before(@o2, '.'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'mix21'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </link>
-
- <xsl:if test="@size">
-
- <tankvolume>
- <xsl:value-of select="substring-before(@size, ' ')"/>
- </tankvolume>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="@start">
- <tankpressurebegin>
- <xsl:value-of select="substring-before(@start, ' ') * 100000"/>
- </tankpressurebegin>
- </xsl:when>
- <xsl:otherwise>
- <tankpressurebegin>
- <xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure]/@pressure[1], ' ') * 100000"/>
- </tankpressurebegin>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test="@end">
- <tankpressureend>
- <xsl:value-of select="substring-before(@end, ' ') * 100000"/>
- </tankpressureend>
- </xsl:when>
- <xsl:otherwise>
- <tankpressureend>
- <xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') * 100000"/>
- </tankpressureend>
- </xsl:otherwise>
- </xsl:choose>
-
- </tankdata>
- </xsl:for-each>
-
<informationafterdive>
<xsl:variable name="trimmedweightlist">
<xsl:for-each select="weightsystem">