Changeset 1aced13 in subsurface


Ignore:
Timestamp:
Apr 1, 2017, 8:06:09 AM (8 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
b919a9d
Parents:
78904b7
git-author:
Miika Turkia <miika.turkia@…> (03/29/17 21:07:13)
git-committer:
Dirk Hohndel <dirk@…> (04/01/17 08:06:09)
Message:

Do not convert empty temperature

Signed-off-by: Miika Turkia <miika.turkia@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • xslt/csv2xml.xslt

    r78904b7 r1aced13  
    288288            </xsl:call-template>
    289289          </xsl:variable>
    290           <xsl:attribute name="temp">
    291             <xsl:choose>
    292               <xsl:when test="$units = 0">
    293                 <xsl:value-of select="translate($temp, ',', '.')"/>
    294               </xsl:when>
    295               <xsl:otherwise>
    296                 <xsl:value-of select="concat(format-number((translate($temp, ',', '.') - 32) * 5 div 9, '0.0'), ' C')"/>
    297               </xsl:otherwise>
    298             </xsl:choose>
    299           </xsl:attribute>
     290          <xsl:if test="$temp != ''">
     291            <xsl:attribute name="temp">
     292              <xsl:choose>
     293                <xsl:when test="$units = 0">
     294                  <xsl:value-of select="translate($temp, ',', '.')"/>
     295                </xsl:when>
     296                <xsl:otherwise>
     297                  <xsl:value-of select="concat(format-number((translate(translate($temp, translate($temp, '0123456789,.', ''), ''), ',', '.') - 32) * 5 div 9, '0.0'), ' C')"/>
     298                </xsl:otherwise>
     299              </xsl:choose>
     300            </xsl:attribute>
     301          </xsl:if>
    300302        </xsl:if>
    301303
Note: See TracChangeset for help on using the changeset viewer.