Sum together all of the weights recored on a dive to use in the <leadquantity> tag in UDDF export.
Signed-off-by: Martin Long <mar...@longhome.co.uk> --- xslt/uddf-export.xslt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt index 9a03256..d4683ee 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> -- 1.9.1 _______________________________________________ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface