Various minor fixes to UDDF export

Removed underscore from buddy name elements
Added 'mix' prefix to gas ids. Ids must not start with a number.
Added mandatory profile data with empty tags.

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-13 00:34:38 +00:00 committed by Dirk Hohndel
parent cbb613bcde
commit 268ac6774c

View file

@ -49,9 +49,12 @@
</image> </image>
</xsl:for-each> </xsl:for-each>
</mediadata> </mediadata>
<diver> <diver>
<owner id="owner"> <owner id="owner">
<personal>
<firstname></firstname>
<lastname></lastname>
</personal>
<equipment> <equipment>
<xsl:for-each select="//dive/divecomputer[generate-id() = generate-id(key('divecomputer', @deviceid)[1])]"> <xsl:for-each select="//dive/divecomputer[generate-id() = generate-id(key('divecomputer', @deviceid)[1])]">
<divecomputer id="{./@deviceid}"> <divecomputer id="{./@deviceid}">
@ -81,12 +84,12 @@
<personal> <personal>
<xsl:choose> <xsl:choose>
<xsl:when test="contains(., ' ')"> <xsl:when test="contains(., ' ')">
<first_name> <firstname>
<xsl:value-of select="substring-before(., ' ')"/> <xsl:value-of select="substring-before(., ' ')"/>
</first_name> </firstname>
<last_name> <lastname>
<xsl:value-of select="substring-after(., ' ')"/> <xsl:value-of select="substring-after(., ' ')"/>
</last_name> </lastname>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<first_name> <first_name>
@ -141,7 +144,7 @@
just use the same references used internally on just use the same references used internally on
Subsurface. Subsurface.
--> -->
<mix id="{$o2}"> <mix id="mix{$o2}">
<name> <name>
<xsl:value-of select="concat($o2, '/', $he)"/> <xsl:value-of select="concat($o2, '/', $he)"/>
</name> </name>
@ -205,7 +208,6 @@
<name> <name>
<xsl:value-of select="."/> <xsl:value-of select="."/>
</name> </name>
<link ref="allbase"/>
<geography> <geography>
<location> <location>
<xsl:value-of select="."/> <xsl:value-of select="."/>
@ -473,10 +475,10 @@
<xsl:attribute name="ref"> <xsl:attribute name="ref">
<xsl:choose> <xsl:choose>
<xsl:when test="@o2 != ''"> <xsl:when test="@o2 != ''">
<xsl:value-of select="substring-before(@o2, '.')"/> <xsl:value-of select="'mix' + substring-before(@o2, '.')"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="'21'"/> <xsl:value-of select="'mix21'"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:attribute> </xsl:attribute>