<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
	<head>
		<title>C470 Projects by Topic</title>
		<link rel="stylesheet" type="text/css" href="../c470styl.css"  />
	</head>
	<body>
		<h1>Photographs</h1>
		<p>
			To submit photos, send them as attachments to an email to <a href="mailto:ayewash@jerodisys.com?subject=C470 Photos" target="_blank">Michael Davis</a>. If possible, include a narrative in the email or as an attachment to describe the project/photos. If you have paper pictures, <a href="../470pix/ppixinst.htm" target="_blank">click here</a> to find out how to submit them.
		</p>
		<p class="centsml">
			(Click on column heading to sort)
		</p>
		<table align="center" bgcolor="#cccccc" border="4" cellpadding="3" cellspacing="0" width="740">
			<tbody>
				<tr>
					<th class="list" valign="middle" width="150"><a href="foto_cat.xml">Category</a></th>
					<th class="list" valign="middle" width="200"><a href="foto_top.xml">Topic</a></th>
					<th class="list" valign="middle" width="210"><a href="foto_own.xml">Owner</a></th>
					<th class="list" valign="middle" width="125"><a href="foto_bot.xml">Boat name</a></th>
					<th class="list" valign="middle" width="40"><a href="foto_hul.xml">Hull</a></th>
					<th class="list" valign="middle" width="50"><a href="foto_dat.xml">Date</a></th>
				</tr>
				<xsl:apply-templates select="//proj_info">
					<xsl:sort select="proj_topic"  />
					<xsl:sort select="hull_num"  />
				</xsl:apply-templates>
			</tbody>
		</table>
	</body>
</html>
</xsl:template>

<xsl:template match="proj_info">
	<tr>
		<td class="list" width="150">
			<xsl:value-of select="pcat_title"  />
		</td>
		<td class="list" width="150">
			<a href="../470pix/{proj_htm}" target="_blank"><xsl:value-of select="proj_topic"  /></a>
		</td>
		<td class="list" width="210">
			<xsl:choose>
				<xsl:when test="own_lname='ZZZZ'">
					<font color="#cccccc">.</font>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="own_full_name"  />
				</xsl:otherwise>
			</xsl:choose>
		</td>
		<td class="list" width="130">
			<xsl:choose>
				<xsl:when test="boat_name='ZZZZ'">
					<font color="#cccccc">.</font>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="boat_name"  />
				</xsl:otherwise>
			</xsl:choose>
		</td>
		<td class="list" align="right" width="40">
			<xsl:choose>
				<xsl:when test="hull_num='ZZZZ'">
					<font color="#cccccc">.</font>
				</xsl:when>
				<xsl:otherwise>
					<xsl:choose>
						<xsl:when test="substring(hull_num,1,3)='000'">
							<xsl:value-of select="substring(hull_num,4)"  />
						</xsl:when>
						<xsl:when test="substring(hull_num,1,2)='00'">
							<xsl:value-of select="substring(hull_num,3)"  />
						</xsl:when>
						<xsl:when test="substring(hull_num,1,1)='0'">
							<xsl:value-of select="substring(hull_num,2)"  />
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="hull_num"  />
						</xsl:otherwise>
					</xsl:choose>
				</xsl:otherwise>
			</xsl:choose>
			</td>
		<td class="list" width="60">
			<xsl:choose>
				<xsl:when test="substring(date_post,6,1)='0'">
					<xsl:choose>
						<xsl:when test="substring(date_post,9,1)='0'">
							<xsl:value-of select="substring(date_post,7,1)"  />/<xsl:value-of select="substring(date_post,10,1)"  />/<xsl:value-of select="substring(date_post,3,2)"  />
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="substring(date_post,7,1)"  />/<xsl:value-of select="substring(date_post,9,2)"  />/<xsl:value-of select="substring(date_post,3,2)"  />
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:choose>
						<xsl:when test="substring(date_post,9,1)='0'">
							<xsl:value-of select="substring(date_post,6,2)"  />/<xsl:value-of select="substring(date_post,10,1)"  />/<xsl:value-of select="substring(date_post,3,2)"  />
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="substring(date_post,6,2)"  />/<xsl:value-of select="substring(date_post,9,2)"  />/<xsl:value-of select="substring(date_post,3,2)"  />
						</xsl:otherwise>
					</xsl:choose>
				</xsl:otherwise>
			</xsl:choose>
		</td>
	</tr>
</xsl:template>
</xsl:stylesheet>
