mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Include dive buddies on uddf import
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1c7efda5e1
commit
a06ce34123
1 changed files with 26 additions and 0 deletions
|
@ -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">
|
||||
|
|
Loading…
Add table
Reference in a new issue