Changeset a489b3f in subsurface


Ignore:
Timestamp:
May 12, 2017, 2:05:33 PM (4 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
b2c7e3e
Parents:
726c9e8
git-author:
Miika Turkia <miika.turkia@…> (05/09/17 12:56:57)
git-committer:
Dirk Hohndel <dirk@…> (05/12/17 14:05:33)
Message:

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@…>

Location:
xslt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • xslt/csv2xml.xslt

    rccf9163 ra489b3f  
    328328            </xsl:when>
    329329            <xsl:otherwise>
    330               <xsl:value-of select="translate(translate($depth, translate($depth, '0123456789,.', ''), ''), ',', '.') * 0.3048"/>
     330              <xsl:value-of select="round(translate(translate($depth, translate($depth, '0123456789,.', ''), ''), ',', '.') * 0.3048 * 1000) div 1000"/>
    331331            </xsl:otherwise>
    332332          </xsl:choose>
  • xslt/xml2csv.xslt

    r99d95c3 ra489b3f  
    3535      <xsl:choose>
    3636        <xsl:when test="$units = 1">
    37           <xsl:value-of select="concat('&quot;', format-number((substring-before(@depth, ' ') div 0.3048), '#.#'), ' ft&quot;')"/>
     37          <xsl:value-of select="concat('&quot;', round((substring-before(@depth, ' ') div 0.3048) * 1000) div 1000, ' ft&quot;')"/>
    3838        </xsl:when>
    3939        <xsl:otherwise>
    40           <xsl:value-of select="concat('&quot;', substring-before(@depth, ' '), '&quot;')"/>
     40          <xsl:value-of select="concat('&quot;', round(substring-before(@depth, ' ') * 1000) div 1000, '&quot;')"/>
    4141        </xsl:otherwise>
    4242      </xsl:choose>
Note: See TracChangeset for help on using the changeset viewer.