Adjust to UDDF 3.2 specification
Signed-off-by: Miika Turkia <[email protected]>
---
xslt/uddf.xslt | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt
index d941d4f..14a163f 100644
--- a/xslt/uddf.xslt
+++ b/xslt/uddf.xslt
@@ -180,6 +180,32 @@
</xsl:if>
</xsl:for-each>
+ <xsl:variable name="buddies">
+ <xsl:for-each select="u:informationbeforedive/u:link">
+ <xsl:variable name="ref">
+ <xsl:value-of select="@ref"/>
+ </xsl:variable>
+ <xsl:for-each select="//u:diver/u:buddy[@id =
$ref]/u:personal/u:firstname|//u:diver/u:buddy[@id =
$ref]/u:personal/u:lastname">
+ <xsl:value-of select="."/>
+ <xsl:if test="following-sibling::* != ''">
+ <xsl:value-of select="' '"/>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:variable name="next">
+ <xsl:value-of select="following-sibling::u:link/@ref"/>
+ </xsl:variable>
+ <xsl:if test="//u:diver/u:buddy[@id = $next]/u:personal/u:firstname
!= ''">
+ <xsl:value-of select="', '"/>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$buddies != ''">
+ <buddy>
+ <xsl:value-of select="$buddies"/>
+ </buddy>
+ </xsl:if>
+
<xsl:if test="buddy_ref/@ref|informationbeforedive/buddy_ref/@ref != ''">
<buddy>
<xsl:variable name="ref">
--
1.9.1
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface