mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
60a7404ed4
commit
9b6c546244
1 changed files with 50 additions and 50 deletions
|
@ -284,6 +284,56 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</informationbeforedive>
|
</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>
|
<samples>
|
||||||
|
|
||||||
<xsl:for-each select="divecomputer[1]/event | divecomputer[1]/sample">
|
<xsl:for-each select="divecomputer[1]/event | divecomputer[1]/sample">
|
||||||
|
@ -483,56 +533,6 @@
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</samples>
|
</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>
|
<informationafterdive>
|
||||||
<xsl:variable name="trimmedweightlist">
|
<xsl:variable name="trimmedweightlist">
|
||||||
<xsl:for-each select="weightsystem">
|
<xsl:for-each select="weightsystem">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue