mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Only import weight if available
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
919cfc9dee
commit
62c7abc2a8
1 changed files with 21 additions and 18 deletions
|
@ -421,14 +421,16 @@
|
|||
</xsl:if>
|
||||
|
||||
<xsl:if test="$weightField >= 0">
|
||||
<weightsystem description="imported">
|
||||
<xsl:attribute name="weight">
|
||||
<xsl:variable name="weight">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$weightField"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="translate($weight, translate($weight, '1234567890,.', ''), '') > 0">
|
||||
<weightsystem description="imported">
|
||||
<xsl:attribute name="weight">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$units = 0">
|
||||
<xsl:value-of select="translate($weight, translate($weight, '1234567890,.', ''), '')"/>
|
||||
|
@ -440,6 +442,7 @@
|
|||
</xsl:attribute>
|
||||
</weightsystem>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
</dive>
|
||||
</xsl:if>
|
||||
|
|
Loading…
Add table
Reference in a new issue