diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2017-05-04 22:35:39 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-06 08:06:42 -0700 |
commit | 95895fc5432caadac04d3f475a229038d413e710 (patch) | |
tree | c12aa1da1aa4657f2bfe2e8453afcb4a89965851 /xslt/uddf.xslt | |
parent | e52d9c2846d543899fbbe64ba0808eb117b6dd17 (diff) | |
download | subsurface-95895fc5432caadac04d3f475a229038d413e710.tar.gz |
Import deviceid from UDDF file
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt/uddf.xslt')
-rw-r--r-- | xslt/uddf.xslt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt index 81435b301..54c79d045 100644 --- a/xslt/uddf.xslt +++ b/xslt/uddf.xslt @@ -11,7 +11,10 @@ <xsl:template match="/"> <divelog program="subsurface-import" version="2"> <settings> - <divecomputerid deviceid="ffffffff"> + <divecomputerid> + <xsl:attribute name="deviceid"> + <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:choose> <xsl:when test="/UDDF/history != ''"> <xsl:apply-templates select="/UDDF/history"/> @@ -335,7 +338,10 @@ </xsl:for-each> - <divecomputer deviceid="ffffffff"> + <divecomputer> + <xsl:attribute name="deviceid"> + <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:attribute> |