<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<!-- the param below is "year" for SORT BY YEAR -->
<xsl:param name="sortVal" select="'title'"/>
<xsl:template match="/">


<HTML>

<HEAD>
<TITLE>Melf's Universe: Movies Melf Likes</TITLE>


<style type="text/css">

	A:link {color:#33FF33; text-decoration: none} 
	A:visited {color:#33FF33; text-decoration: none}
	A:active {color:#FF3333; text-decoration: none}
	A:hover{color:#FF3333; text-decoration: none}
	body {FONT-FAMILY: Arial;}
    th.main {background-color: #CCCCCC}
	td.main {background-color: #CCCCCC}
 
</style>

<script LANGUAGE="JavaScript">

function home_red(x) {

  if (x == 0)
    document.home_link.src="../images/moon_home.gif";
  else if (x == 1)
    document.home_link.src="../images/moon_home_red.gif";
}

function moon_glow(y) {

  if (y == 1)
    document.about.src =  "../images/moon_about_glow.gif";
  else if (y == 2)
    document.port.src =  "../images/moon_portfolio_glow.gif";
  else if (y == 3)
    document.random.src =  "../images/moon_random_glow.gif";
  else if (y == 4)
    document.ranting.src =  "../images/moon_ranting_glow.gif";
  else if (y == 5)
    document.games.src =  "../images/moon_games_glow.gif";
  else if (y == 6)
    document.japan.src =  "../images/moon_japan_glow.gif";
  else if (y == 7)
    document.nz.src =  "../images/moon_nz_glow.gif";
}

function moon_no_glow(z) {

  if (z == 1)
    document.about.src =  "../images/moon_about.gif";
  else if (z == 2)
    document.port.src =  "../images/moon_portfolio.gif";
  else if (z == 3)
    document.random.src =  "../images/moon_random.gif";
  else if (z == 4)
    document.ranting.src =  "../images/moon_ranting.gif";
  else if (z == 5)
    document.games.src =  "../images/moon_games.gif";
  else if (z == 6)
    document.japan.src =  "../images/moon_japan.gif";
  else if (z == 7)
    document.nz.src =  "../images/moon_nz.gif";
}

</script>

</HEAD>

<BODY BACKGROUND="../images/stars_bg.gif">

<div STYLE="POSITION:absolute; LEFT:15; TOP:0;">
 <a HREF="../index.html" onMouseOver="home_red(1)" onMouseOut="home_red(0)">
  <img BORDER="0" NAME="home_link" SRC="../images/moon_home.gif" />
 </a>
</div>


<table border="0" CELLPADDING="5">  <!-- OUTER TABLE -->
<tr><td> <!-- space --> <img SRC="../images/null.gif" HEIGHT="20" /> </td></tr> <tr><td>   <!-- OUTER TABLE -->
  <center>
    <table WIDTH="850"><tr><td>
        
        <A HREF="index.html" onMouseOver="moon_glow(1)" onMouseOut="moon_no_glow(1)">
        <img BORDER="0" NAME="about" ALIGN="LEFT" SRC="../images/moon_about.gif"/> <b>ABOUT<br />MELF<br />_______</b>
        </A>
          </td><td>
        <font COLOR="white" SIZE="2">
        <a HREF="../games/index.html" onMouseOver="moon_glow(5)" onMouseOut="moon_no_glow(5)">
        <img BORDER="0" NAME="games" ALIGN="LEFT" SRC="../images/moon_games.gif"/> <b>MELF'S<br />GAMES</b>
        </a>
        </font>  </td><td>
        <font COLOR="white" SIZE="2">
        <a HREF="../japan/index.html" onMouseOver="moon_glow(6)" onMouseOut="moon_no_glow(6)">
        <img BORDER="0" NAME="japan" ALIGN="LEFT" SRC="../images/moon_japan.gif"/> <b>LIFE IN<br />JAPAN</b>
        </a>
        </font>  </td><td>
        <font COLOR="white" SIZE="2">
        <a HREF="../nz/index.html" onMouseOver="moon_glow(7)" onMouseOut="moon_no_glow(7)">
        <img BORDER="0" NAME="nz" ALIGN="LEFT" SRC="../images/moon_nz.gif"/> <b>LIFE IN NEW<br />ZEALAND</b>
        </a>
        </font>  </td><td>
        <font COLOR="white" SIZE="2">
        <a HREF="../ranting/index.html" onMouseOver="moon_glow(4)" onMouseOut="moon_no_glow(4)">
        <img BORDER="0" NAME="ranting" ALIGN="LEFT" SRC="../images/moon_ranting.gif"/> <b>MELF'S<br />RANTINGS</b>
        </a>
        </font>  </td><td>
        <font COLOR="white" SIZE="2">
        <a HREF="../random/index.html" onMouseOver="moon_glow(3)" onMouseOut="moon_no_glow(3)">
        <img BORDER="0" NAME="random" ALIGN="LEFT" SRC="../images/moon_random.gif" /> <b>RANDOM<br />STUFF</b>
        </a>
        </font>  </td><td>
        <font COLOR="white" SIZE="2">
        <a HREF="../portfolio/index.html" onMouseOver="moon_glow(2)" onMouseOut="moon_no_glow(2)">
        <img BORDER="0" NAME="port" ALIGN="LEFT" SRC="../images/moon_portfolio.gif" /> <b>MELF'S<br />PORTFOLIO</b>  
        </a>
        </font> 
    </td></tr></table>
  </center>
</td></tr> <tr><td> <!-- space --><center>
<table BORDER="0" BGCOLOR="#000000" CELLPADDING="5" BORDERCOLORLIGHT="#777777"><tr><td> <center><font COLOR="#FFFFFF">
 <a HREF="faves.html">favorites</a>    |     <a HREF="facts.html">random melf facts</a>   |   movies melf likes
 </font></center></td></tr></table></center></td></tr> <tr><td>  <!-- OUTER TABLE -->

<!-- <center>
<hr WIDTH="90%">
</center> -->

<br />
  <table CELLPADDING="15"><tr><td>

  <center>
   <br />
   <table BGCOLOR="#000000"><tr><td>
   
  <font COLOR="#3333FF">

<p>
<br />
</p>

<b>I wrote this page solely to play with XML.  So why not babble about movies while I'm at it?<br />
<ul>
	<li>XML source: <a href="MelfMoviesSource.xml" target="new">MelfMoviesSource.xml</a></li>
	<li>XLS source: <a href="MelfMovies.xsl" target="new2">MelfMovies.xsl</a>  </li>
</ul>
<br/>

</b>
<font color="#FFFFFF">Sort by Title</font>  |  <a href="MelfMoviesY.xml"> Sort by Year</a>
<br/>
<br/>				

<table border="1">
   
	<tbody>
		<tr>
			<th class="main"><b>Title</b></th>
			<th class="main"><b>Year</b></th>
			<th class="main"><b>Genre</b></th>
			<th class="main"><b>Why I Love It</b></th>
		</tr>
		<xsl:for-each select="favorite_movies/movie">
		<xsl:sort select="*[name()=$sortVal]"  />
		<tr>
			<td class="main" width="30%"><b><xsl:value-of select="title"/></b></td>
			<td class="main"><xsl:value-of select="year"/><xsl:value-of select="year-more"/></td>
			<td class="main"><xsl:value-of select="genre"/></td>
			<td class="main"><xsl:value-of select="happy"/></td>
		</tr>
		</xsl:for-each>
	</tbody>
</table>



</font>

</td></tr></table> <!-- OUTER TABLE -->
</center>

</td></tr></table>

</td></tr></table>

</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>


