topical media & game development
basic-ajax-01-MenuDisplay.xsl / xsl
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<div onmouseout=" var submenu = document.getElementById('romesubmenu');submenu.style.visibility = 'hidden';return true;" >
<table>
<tr>
<td id="td1" class="menublock" onMouseOver="td1.style.backgroundColor='#cccccc';" onMouseOut="td1.style.backgroundColor='#eeeeff';" >
Hotel Paris
</td>
</tr>
<tr>
<td id="td2" class="menublock" onMouseOver="td2.style.backgroundColor='#cccccc';" onMouseOut="td2.style.backgroundColor='#eeeeff';" >
Hotel London
</td>
</tr>
<tr>
<td id="td3" class="menublock" onmouseover="td3.style.backgroundColor='#cccccc';var submenu = document.getElementById('romesubmenu');submenu.style.visibility = 'visible';return true;" onMouseOut="td3.style.backgroundColor='#eeeeff';" >
Hotel Rome
</td>
</tr>
<tr>
<td id="td4" class="menublock" onMouseOver="td4.style.backgroundColor='#cccccc';" onMouseOut="td4.style.backgroundColor='#eeeeff';" >
Hotel New York
</td>
</tr>
<tr>
<td id="td5" class="menublock" onMouseOver="td5.style.backgroundColor='#cccccc';" onMouseOut="td5.style.backgroundColor='#eeeeff';" >
Hotel Montreal
</td>
</tr>
</table>
<xsl:call-template name="DynamicSubMenu"></xsl:call-template>
</div>
</xsl:template>
<xsl:template name="DynamicSubMenu">
<div id="romesubmenu" class="submenublock" onmouseover="var submenu = document.getElementById('romesubmenu');submenu.style.visibility = 'visible';return true;">
<xsl:for-each select="//Suite">
<xsl:if test="WeeksFree>0">
<a href="{Name}.htm">
<xsl:value-of select="Name"/>
</a>
<br/>
</xsl:if>
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.