mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
CSV import: add XSLT support for DC hw info
Include the DC's hardware name if it was given as parameter on CSV import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
615f45e58b
commit
02488ba9df
1 changed files with 14 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
||||||
<xsl:param name="units" select="units"/>
|
<xsl:param name="units" select="units"/>
|
||||||
<xsl:param name="separatorIndex" select="separatorIndex"/>
|
<xsl:param name="separatorIndex" select="separatorIndex"/>
|
||||||
<xsl:param name="delta" select="delta"/>
|
<xsl:param name="delta" select="delta"/>
|
||||||
|
<xsl:param name="hw" select="hw"/>
|
||||||
<xsl:output method="xml" indent="yes"/>
|
<xsl:output method="xml" indent="yes"/>
|
||||||
|
|
||||||
<xsl:variable name="lf"><xsl:text>
|
<xsl:variable name="lf"><xsl:text>
|
||||||
|
@ -51,7 +52,19 @@
|
||||||
<cylinder description='diluent' o2="21.0%" use='diluent' />
|
<cylinder description='diluent' o2="21.0%" use='diluent' />
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<divecomputer model="Imported from CSV" deviceid="ffffffff">
|
<divecomputer deviceid="ffffffff">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="string-length($hw) > 0">
|
||||||
|
<xsl:attribute name="model">
|
||||||
|
<xsl:value-of select="$hw" />
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:attribute name="model">
|
||||||
|
<xsl:value-of select="'Imported from CSV'" />
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
<xsl:if test="$po2Field >= 0 or $setpointField >= 0 or $o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0">
|
<xsl:if test="$po2Field >= 0 or $setpointField >= 0 or $o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0">
|
||||||
<xsl:attribute name="dctype">CCR</xsl:attribute>
|
<xsl:attribute name="dctype">CCR</xsl:attribute>
|
||||||
<xsl:attribute name="no_o2sensors">
|
<xsl:attribute name="no_o2sensors">
|
||||||
|
|
Loading…
Reference in a new issue