summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-05-04 23:08:18 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-05-06 08:06:42 -0700
commit95365292ef4d6cf3902924de819cad7cf0f5f50d (patch)
treebdea2279aac1606ef2a6b6867421c3d8c09a8f76 /xslt
parentba5f10aaf2566f8374eb3d9e18e9e6f7be8aea24 (diff)
downloadsubsurface-95365292ef4d6cf3902924de819cad7cf0f5f50d.tar.gz
Grab DC model on UDDF import if available
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/uddf.xslt9
1 files changed, 8 insertions, 1 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt
index 2ff57fffd..e5c0f33f1 100644
--- a/xslt/uddf.xslt
+++ b/xslt/uddf.xslt
@@ -349,7 +349,14 @@
<xsl:value-of select="/uddf/diver/owner/equipment/divecomputer/@id|/u:uddf/u:diver/u:owner/u:equipment/u:divecomputer/@id|/u1:uddf/u1:diver/u1:owner/u1:equipment/u1:divecomputer/@id" />
</xsl:attribute>
<xsl:attribute name="model">
- <xsl:value-of select="/uddf/generator/name|/u:uddf/u:generator/u:name|/u1:uddf/u1:generator/u1:name|/UDDF/history/modified/application/name"/>
+ <xsl:choose>
+ <xsl:when test="/uddf/diver/owner/equipment/divecomputer/model|/u:uddf/u:diver/u:owner/u:equipment/u:divecomputer/u:model|/u1:uddf/u1:diver/u1:owner/u1:equipment/u1:divecomputer/u1:model != ''">
+ <xsl:value-of select="/uddf/diver/owner/equipment/divecomputer/model|/u:uddf/u:diver/u:owner/u:equipment/u:divecomputer/u:model|/u1:uddf/u1:diver/u1:owner/u1:equipment/u1:divecomputer/u1:model" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="/uddf/generator/name|/u:uddf/u:generator/u:name|/u1:uddf/u1:generator/u1:name|/UDDF/history/modified/application/name"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:attribute>
<depth>