Aggregate multiple weights into UDDF export.

Sum together all of the weights recored on a dive to use in the
<leadquantity> tag in UDDF export.

Signed-off-by: Martin Long <martin@longhome.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Martin Long 2014-12-10 21:30:32 +00:00 committed by Dirk Hohndel
parent 18aa6f5ed8
commit 434f19cf56

View file

@ -248,8 +248,16 @@
</xsl:attribute>
</link>
</xsl:if>
<xsl:variable name="trimmedweightlist">
<xsl:for-each select="weightsystem">
<weight>
<xsl:value-of select="substring-before(@weight, ' ')"/>
</weight>
</xsl:for-each>
</xsl:variable>
<equipmentused>
<leadquantity><xsl:value-of select="substring-before(weightsystem/@weight, ' ')"/>
<leadquantity>
<xsl:value-of select="sum(xt:node-set($trimmedweightlist)/weight)"/>
</leadquantity>
</equipmentused>
</informationbeforedive>