diff options
author | Martin Long <martin@longhome.co.uk> | 2014-12-10 21:30:32 +0000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-10 14:49:39 -0700 |
commit | 434f19cf5686bc3bf5782841811515496c369a38 (patch) | |
tree | 03db43a4b0650109e31060569e93ea1a95ebf8f5 | |
parent | 18aa6f5ed8a776fba3011360ab57569a01a63940 (diff) | |
download | subsurface-434f19cf5686bc3bf5782841811515496c369a38.tar.gz |
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>
-rw-r--r-- | xslt/uddf-export.xslt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt index 9a0325689..d4683ee12 100644 --- a/xslt/uddf-export.xslt +++ b/xslt/uddf-export.xslt @@ -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> |