<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" >
	<xsl:output method="html"/>
	<xsl:template match="/">
<html><head><title>In the Name of the Moon: Torvil's Characters</title></head>

<body>
	<h2 align="center">Torvil's In the Name of the Moon Characters</h2>
	<table align="center">
	  <xsl:apply-templates select="characters/character">
		<xsl:sort select="age" order="descending" data-type="number" />
	  </xsl:apply-templates>
	 </table>
</body>
</html>
</xsl:template>

<xsl:template match="character">
	<tr>
	 <td>
	  <img><xsl:attribute name="src"><xsl:value-of select="headshot_image_civ/@file" /></xsl:attribute></img>
	 </td>
	 <td>
	  <strong>Civilian Name: </strong><xsl:value-of select="first_name" /><xsl:text> </xsl:text><xsl:value-of select="last_name" /><br />
	  <strong>Powered Name: </strong><xsl:value-of select="powered_rank" /><xsl:text> </xsl:text><xsl:value-of select="powered_name" /><br />
	  <strong>Gender: </strong><xsl:value-of select="gender" /><br />
	  <strong>Age: </strong><xsl:value-of select="age" /><br />
	  <strong>Height: </strong><xsl:value-of select="height_feet" /><xsl:text> </xsl:text><xsl:value-of select="height_feet/@units" /><xsl:text> </xsl:text><xsl:value-of select="height_inch" /><xsl:text> </xsl:text><xsl:value-of select="height_inch/@units" /><br />
	  <strong>Weight: </strong><xsl:value-of select="weight" /><xsl:text> </xsl:text><xsl:value-of select="weight/@units" /><br />
	  <strong>Orientation: </strong><xsl:value-of select="sexual_orientation" /><br />
	  <strong>Background: </strong><xsl:value-of select="background" /><br />
	  <strong>Weapon: </strong><xsl:value-of select="weapon" /><br />
	  <em><a><xsl:attribute name="href"><xsl:value-of select="journal/@url" /></xsl:attribute>Journal</a></em>
	</td>
	<td>
	 <img><xsl:attribute name="src"><xsl:value-of select="headshot_image_pwr/@file" /></xsl:attribute></img>
	</td>
   </tr>
	
</xsl:template>


</xsl:stylesheet>