<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<HTML>
<HEAD>
</HEAD>
<BODY>
<TABLE border="0" cellpadding="3" cellspacing="3">
 <TR>
  <TH style="background-color:beige">Name</TH>
  <TH style="background-color:beige">Salary</TH>
  <TH style="background-color:beige">Dept.</TH>
 </TR>
<xsl:for-each select="employees/employee">
 <xsl:variable name="Dept" select="department" />
<TR VALIGN="top" 
  onmouseover="this.style.backgroundColor='lightcyan'" 
  onmouseout="this.style.backgroundColor='white'" 
  style="background-color:white;cursor:hand" onclick="alert('You are in the {$Dept} Department!')">
  <TD>
   <xsl:value-of select="name"/>
  </TD>
  <TD>
   <xsl:value-of select="salary"/>
  </TD>
  <TD>
   <xsl:value-of select="department"/>
  </TD>
 </TR>
</xsl:for-each>
</TABLE>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>

