Rounding imperial export for profile

Precision for the rounding is more than makes sense, but this satisfied
the test case.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2017-05-09 22:56:57 +03:00 committed by Dirk Hohndel
parent 726c9e859c
commit a489b3fa42
2 changed files with 3 additions and 3 deletions

View file

@ -327,7 +327,7 @@
<xsl:value-of select="translate($depth, ',', '.')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="translate(translate($depth, translate($depth, '0123456789,.', ''), ''), ',', '.') * 0.3048"/>
<xsl:value-of select="round(translate(translate($depth, translate($depth, '0123456789,.', ''), ''), ',', '.') * 0.3048 * 1000) div 1000"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>

View file

@ -34,10 +34,10 @@
<xsl:value-of select="$fs"/>
<xsl:choose>
<xsl:when test="$units = 1">
<xsl:value-of select="concat('&quot;', format-number((substring-before(@depth, ' ') div 0.3048), '#.#'), ' ft&quot;')"/>
<xsl:value-of select="concat('&quot;', round((substring-before(@depth, ' ') div 0.3048) * 1000) div 1000, ' ft&quot;')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('&quot;', substring-before(@depth, ' '), '&quot;')"/>
<xsl:value-of select="concat('&quot;', round(substring-before(@depth, ' ') * 1000) div 1000, '&quot;')"/>
</xsl:otherwise>
</xsl:choose>