diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-02-01 09:56:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-01 07:09:59 -0800 |
commit | 737b5bdd5c05be1a6e84755cf0b0fe84aeb26fdf (patch) | |
tree | a40b7e3c3503e4d668f95537f056486a9323626a | |
parent | 5343b909fa960e5103314eb1ea40304ffe52dbb6 (diff) | |
download | subsurface-737b5bdd5c05be1a6e84755cf0b0fe84aeb26fdf.tar.gz |
Count the UDDF samples in different namespaces
Since UDDF import uses different namespaces, we need to count the
temperature samples in all of them to get temperature readings from
waypoints.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | xslt/commonTemplates.xsl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xslt/commonTemplates.xsl b/xslt/commonTemplates.xsl index 7185ce3c0..86f9cda63 100644 --- a/xslt/commonTemplates.xsl +++ b/xslt/commonTemplates.xsl @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:u="http://www.streit.cc/uddf/3.2/" + xmlns:u1="http://www.streit.cc/uddf/3.1/" + > <!-- Convert ISO 8601 time format to "standard" date and time format --> @@ -142,13 +145,13 @@ <xsl:param name="units"/> <xsl:choose> <xsl:when test="$units = 'Imperial'"> - <xsl:value-of select="count(descendant::temperature[. != 32])"/> + <xsl:value-of select="count(descendant::temperature[. != 32]|descendant::u:temperature[. != 32]|descendant::u1:temperature[. != 32])"/> </xsl:when> <xsl:when test="$units = 'Kelvin'"> - <xsl:value-of select="count(descendant::temperature[. != 273.15])"/> + <xsl:value-of select="count(descendant::temperature[. != 273.15]|descendant::u:temperature[. != 273.15]|descendant::u1:temperature[. != 273.15])"/> </xsl:when> <xsl:otherwise> - <xsl:value-of select="count(descendant::temperature[. != 0])"/> + <xsl:value-of select="count(descendant::temperature[. != 0]|descendant::u:temperature[. != 0]|descendant::u1:temperature[. != 0])"/> </xsl:otherwise> </xsl:choose> </xsl:template> |