How do I display timeServed in xsl transformation based on x
Posted: Fri Jun 27, 2014 5:13 pm
How do I use when to display nothing if timeServed="8:25 AM" is not provided in xml document? Right now it is displaying time because there is time in xml. What do I do so when there is no timeServed nothing is displayed?
My xml
my xsl
My xml
Code: Select all
<xsl:template match="NotificationEvent[@notificationType='ProtectionOrderService']">
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceTime>
<xsl:value-of select="mscef:formatTime(concat(@dateServed,' ',@timeServed))"/>
</ext:ProtectionOrderServiceTime>
</ext:ProtectionOrderService>
</xsl:template>
Code: Select all
<NotificationEvent notificationType="ProtectionOrderService" timeServed="8:25 AM" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"></NotificationEvent>