
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html"/>
	<!-- Main Template Begins-->
	<xsl:template match="election">
		<html>
			<head>
				<title>The Olympian 2005 local election guide</title>
				<style type="text/css">

.name {
  font: 12px "tahoma", arial, helevetica, sans-serif; 
  background-color: lavender;
}
.city {
  font: 12px "tahoma", arial, helevetica, sans-serif; 
  background-color: #f0ffff;
}
.style {
  font: 12px "tahoma", arial, helevetica, sans-serif; 
  background-color: #BFCFFF;
}
     
        </style>
      </head>
			<body>
			
<div class="election">
<form action="candidates.xml" method="post">
<select name="selector">
<option value="name">Candidate name</option>
<option value="position_title">Office sought</option>
<option value="voting_district">Voting district</option>
<option value="city">City</option>
</select>
Search:<input type="text" name="value" value="" />
<input type="submit" value="Search" />
</form>

<table width="500" cellpadding="2">
<tr>
  <th>Candidate</th>
  <th>Office</th>
  <th>Voting District</th>
</tr>
<xsl:for-each select="candidate">
<xsl:if test="(contains(translate(child::,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'), ''))">
<tr>
  <td width="200" class="name">
  <xsl:value-of select="name" />
  </td>
	<td width="200" class="city"><xsl:value-of select="position_title" /> </td>      
  <td width="100" class="style"><xsl:value-of select="voting_district" /> </td>    
</tr>

</xsl:if>
</xsl:for-each> 
</table>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
