<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:specter="urn:specter-instruments">
  <xsl:output method="xml" />
  <ms:script language="C#" implements-prefix="specter">
    <![CDATA[              
         public string localTime(String str)
         {
      DateTime dt = DateTime.Parse(str);
            return dt.ToLocalTime().ToString("T");
         }
    ]]>
  </ms:script>
<xsl:template match="/">
        <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="de-de"><break time="444ms"/><p><s><xsl:choose>
                <xsl:when test="NotificationEvent/AlarmEvent/Condition/Description = '' or not(NotificationEvent/AlarmEvent/Condition/Description)"><xsl:value-of select="NotificationEvent/AlarmEvent/Condition/Name"/></xsl:when>
                <xsl:otherwise><xsl:value-of select="NotificationEvent/AlarmEvent/Condition/Description"/></xsl:otherwise>
            </xsl:choose> was <xsl:choose>
                <xsl:when test="NotificationEvent/AlarmEvent/State/IsActive = 'true'">active</xsl:when>
                <xsl:otherwise>inactive</xsl:otherwise></xsl:choose>
                <xsl:if test="NotificationEvent/AlarmEvent/State/IsAcked = 'true'"> and acknowledged<xsl:if test="NotificationEvent/AlarmEvent/Actor != ''"> by <xsl:value-of select="NotificationEvent/AlarmEvent/Actor"/>
</xsl:if></xsl:if>
                <xsl:if test="NotificationEvent/AlarmEvent/State/IsAcked != 'true'"> and unacknowledged </xsl:if>as of <say-as interpret-as="time" format="hms12"><xsl:value-of select="specter:localTime(NotificationEvent/AlarmEvent/Vtq/EventTime)"/></say-as></s></p></speak>
    </xsl:template>
</xsl:stylesheet>