summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xslt/manualcsv2xml.xslt17
1 files changed, 11 insertions, 6 deletions
diff --git a/xslt/manualcsv2xml.xslt b/xslt/manualcsv2xml.xslt
index 736b8b24c..7e138d1e0 100644
--- a/xslt/manualcsv2xml.xslt
+++ b/xslt/manualcsv2xml.xslt
@@ -61,12 +61,17 @@
<xsl:param name="line"/>
<xsl:variable name="number">
- <xsl:if test="$numberField >= 0">
- <xsl:call-template name="getFieldByIndex">
- <xsl:with-param name="index" select="$numberField"/>
- <xsl:with-param name="line" select="$line"/>
- </xsl:call-template>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$numberField >= 0">
+ <xsl:call-template name="getFieldByIndex">
+ <xsl:with-param name="index" select="$numberField"/>
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'0'"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
<xsl:if test="$number >= 0">