mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Support for multiple cylinders on UDDF export
Adding support for multiple cylinders on UDDF export. This also adds a cylinder reference to the tankdata to enable mix lookups. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
683227d2aa
commit
16d7f5e86e
1 changed files with 46 additions and 31 deletions
|
@ -359,43 +359,58 @@
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</samples>
|
</samples>
|
||||||
|
|
||||||
<tankdata>
|
<xsl:for-each select="cylinder">
|
||||||
<xsl:if test="cylinder[1]/@size">
|
<tankdata>
|
||||||
<tankvolume>
|
<link>
|
||||||
<xsl:value-of select="substring-before(cylinder[1]/@size, ' ')"/>
|
<xsl:attribute name="ref">
|
||||||
</tankvolume>
|
<xsl:choose>
|
||||||
</xsl:if>
|
<xsl:when test="@o2 != ''">
|
||||||
<xsl:choose>
|
<xsl:value-of select="substring-before(@o2, '.')"/>
|
||||||
<xsl:when test="divecomputer[1]/sample/@pressure != ''">
|
</xsl:when>
|
||||||
<tankpressurebegin>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="substring-before(divecomputer[1]/sample/@pressure[1], ' ') * 100000"/>
|
<xsl:value-of select="'21'"/>
|
||||||
</tankpressurebegin>
|
</xsl:otherwise>
|
||||||
</xsl:when>
|
</xsl:choose>
|
||||||
<xsl:otherwise>
|
</xsl:attribute>
|
||||||
<xsl:if test="cylinder[1]/@start">
|
</link>
|
||||||
|
|
||||||
|
<xsl:if test="@size">
|
||||||
|
<tankvolume>
|
||||||
|
<xsl:value-of select="substring-before(@size, ' ')"/>
|
||||||
|
</tankvolume>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="divecomputer[1]/sample/@pressure != ''">
|
||||||
<tankpressurebegin>
|
<tankpressurebegin>
|
||||||
<xsl:value-of select="substring-before(cylinder[1]/@start, ' ') * 100000"/>
|
<xsl:value-of select="substring-before(divecomputer[1]/sample/@pressure[1], ' ') * 100000"/>
|
||||||
</tankpressurebegin>
|
</tankpressurebegin>
|
||||||
</xsl:if>
|
</xsl:when>
|
||||||
</xsl:otherwise>
|
<xsl:otherwise>
|
||||||
</xsl:choose>
|
<xsl:if test="@start">
|
||||||
|
<tankpressurebegin>
|
||||||
|
<xsl:value-of select="substring-before(@start, ' ') * 100000"/>
|
||||||
|
</tankpressurebegin>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="count(divecomputer[1]/sample[@pressure]) > 0">
|
<xsl:when test="count(divecomputer[1]/sample[@pressure]) > 0">
|
||||||
<tankpressureend>
|
|
||||||
<xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') * 100000"/>
|
|
||||||
</tankpressureend>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:if test="cylinder[1]/@end">
|
|
||||||
<tankpressureend>
|
<tankpressureend>
|
||||||
<xsl:value-of select="substring-before(cylinder[1]/@end, ' ') * 100000"/>
|
<xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') * 100000"/>
|
||||||
</tankpressureend>
|
</tankpressureend>
|
||||||
</xsl:if>
|
</xsl:when>
|
||||||
</xsl:otherwise>
|
<xsl:otherwise>
|
||||||
</xsl:choose>
|
<xsl:if test="@end">
|
||||||
|
<tankpressureend>
|
||||||
|
<xsl:value-of select="substring-before(@end, ' ') * 100000"/>
|
||||||
|
</tankpressureend>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
</tankdata>
|
</tankdata>
|
||||||
|
</xsl:for-each>
|
||||||
|
|
||||||
<informationafterdive>
|
<informationafterdive>
|
||||||
<xsl:if test="node()/depth/@max != ''">
|
<xsl:if test="node()/depth/@max != ''">
|
||||||
|
|
Loading…
Add table
Reference in a new issue