summaryrefslogtreecommitdiffstats
path: root/xslt/xml2manualcsv.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-12-22 23:04:06 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-22 14:25:52 -0800
commita950365b6ff137c21677539f16555e8a66208c0f (patch)
tree2db36616d8c84b0ad76c4d13a80f5657694f377c /xslt/xml2manualcsv.xslt
parent663f6eef0b863d7d536544e1b31b47cd79533224 (diff)
downloadsubsurface-a950365b6ff137c21677539f16555e8a66208c0f.tar.gz
Include some empty fields if they are not available
If specific value is not available, we need to have an empty value instead. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/xml2manualcsv.xslt')
-rw-r--r--xslt/xml2manualcsv.xslt16
1 files changed, 16 insertions, 0 deletions
diff --git a/xslt/xml2manualcsv.xslt b/xslt/xml2manualcsv.xslt
index aab66af7c..b549e953a 100644
--- a/xslt/xml2manualcsv.xslt
+++ b/xslt/xml2manualcsv.xslt
@@ -60,8 +60,20 @@
<xsl:text>&quot;&quot;</xsl:text>
</xsl:if>
<xsl:apply-templates select="divemaster"/>
+ <xsl:if test="string-length(divemaster) = 0">
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;&quot;</xsl:text>
+ </xsl:if>
<xsl:apply-templates select="buddy"/>
+ <xsl:if test="string-length(buddy) = 0">
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;&quot;</xsl:text>
+ </xsl:if>
<xsl:apply-templates select="suit"/>
+ <xsl:if test="string-length(suit) = 0">
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;&quot;</xsl:text>
+ </xsl:if>
<xsl:value-of select="$fs"/>
<xsl:text>&quot;</xsl:text>
<xsl:value-of select="@rating"/>
@@ -71,6 +83,10 @@
<xsl:value-of select="@visibility"/>
<xsl:text>&quot;</xsl:text>
<xsl:apply-templates select="notes"/>
+ <xsl:if test="string-length(notes) = 0">
+ <xsl:value-of select="$fs"/>
+ <xsl:text>&quot;&quot;</xsl:text>
+ </xsl:if>
<xsl:text>
</xsl:text>
</xsl:template>