mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add 'trip' support to UDDF export
Currently repetition groups are used to group dives into trips. This is not really correct. Repetition groups should really represent a group of dives where tissue loading needs to be preserved between dives (typically the same day). UDDF has support for trips, using the <divetrip> tags. This is a bidirectional link between the dives and the trips. This patch adds support for these trips. However, it leaves in the repetition groups. Repetition groups may need further consideration. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
719cfe0ece
commit
71949b20d4
1 changed files with 28 additions and 0 deletions
|
@ -149,6 +149,7 @@
|
||||||
</gasdefinitions>
|
</gasdefinitions>
|
||||||
|
|
||||||
<profiledata>
|
<profiledata>
|
||||||
|
|
||||||
<xsl:for-each select="trip">
|
<xsl:for-each select="trip">
|
||||||
<repetitiongroup id="{generate-id(.)}">
|
<repetitiongroup id="{generate-id(.)}">
|
||||||
<xsl:apply-templates select="dive"/>
|
<xsl:apply-templates select="dive"/>
|
||||||
|
@ -160,6 +161,11 @@
|
||||||
</repetitiongroup>
|
</repetitiongroup>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</profiledata>
|
</profiledata>
|
||||||
|
|
||||||
|
<divetrip>
|
||||||
|
<xsl:apply-templates select="//trip"/>
|
||||||
|
</divetrip>
|
||||||
|
|
||||||
</uddf>
|
</uddf>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
@ -260,6 +266,9 @@
|
||||||
<xsl:value-of select="sum(xt:node-set($trimmedweightlist)/weight)"/>
|
<xsl:value-of select="sum(xt:node-set($trimmedweightlist)/weight)"/>
|
||||||
</leadquantity>
|
</leadquantity>
|
||||||
</equipmentused>
|
</equipmentused>
|
||||||
|
<xsl:if test="parent::trip">
|
||||||
|
<tripmembership><xsl:value-of select="../@location"/> <xsl:value-of select="../@date"/></tripmembership>
|
||||||
|
</xsl:if>
|
||||||
</informationbeforedive>
|
</informationbeforedive>
|
||||||
|
|
||||||
<samples>
|
<samples>
|
||||||
|
@ -573,6 +582,25 @@
|
||||||
</dive>
|
</dive>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="trip">
|
||||||
|
<trip id="{@location} {@date}">
|
||||||
|
<trippart>
|
||||||
|
<name><xsl:value-of select="@location"/> <xsl:value-of select="@date"/></name>
|
||||||
|
<relateddives>
|
||||||
|
<xsl:for-each select="dive">
|
||||||
|
<link ref="{generate-id(.)}"/>
|
||||||
|
</xsl:for-each>
|
||||||
|
</relateddives>
|
||||||
|
<xsl:if test="notes != ''">
|
||||||
|
<notes>
|
||||||
|
<para>
|
||||||
|
<xsl:value-of select="notes"/>
|
||||||
|
</para>
|
||||||
|
</notes>
|
||||||
|
</xsl:if>
|
||||||
|
</trippart>
|
||||||
|
</trip>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Approximate waypoint depth.
|
<!-- Approximate waypoint depth.
|
||||||
Parameters:
|
Parameters:
|
||||||
|
|
Loading…
Add table
Reference in a new issue