<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="extensions xalan" xmlns:fnplm="urn:fnplm:lmadmin" xmlns:extensions="urn:fnplm:lmadmin" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl">
  <xsl:output method="html"/>
  
  <xsl:template match="/" name="sessionTimeout">
    <script type="text/javascript">
      <xsl:choose>
        <xsl:when test="$compliance508!='TRUE'">
          window.location.href = "/login?failed=sessiontimeout";
        </xsl:when>
        <xsl:otherwise>
          window.location.href = "/login508?failed=sessiontimeout";
        </xsl:otherwise>
      </xsl:choose>
    </script>
    
    <xsl:variable name="args">
      <xml>
        <fnplm:args>
          <xsl:attribute name="href">
            <xsl:choose>
              <xsl:when test="$compliance508!='TRUE'">/login?failed=sessiontimeout</xsl:when>
              <xsl:otherwise>/login508?failed=sessiontimeout&amp;compliance508=TRUE</xsl:otherwise>
            </xsl:choose>
          </xsl:attribute>
        </fnplm:args>
      </xml>
    </xsl:variable>
    
    <xsl:value-of select="extensions:getFormattedString('IDS_SESSION_TIMEOUT_MESSAGE_LINK', exsl:node-set($args)/xml/*)" disable-output-escaping="yes"/>
  </xsl:template>
</xsl:stylesheet>
