I wanted to change the date order from yyyy-mm-dd to dd / mm / yyyy, but use null or empty dates. I used code
<xsl:template match="data_submitted">
<data_submitted>
<xsl:if test="data_submitted != ''">
<xsl:value-of select=
"concat(substring(.,9), '/',
(substring(.,6,2)), '/',
substring(.,1,4))"
/>
</xsl:if>
</data_submitted>
</xsl:template>
but these are dated dates in general. Leaving the given in null dates appearing as // in my result. I'm sure I probably got it, if in the wrong place or something like that, but I want the tag to appear even if it's empty.
Any suggestions?
Update:
, xml, null empty, , , . xml: data_submitted> </data_submitted> 8 .
test="data_submitted != ' '"
, :
test=".!= ''", 8 .