<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


<xsl:template match="/">
 <html>
  <head>
   <title>

	<xsl:value-of select="units/unit/@name"/>

   </title>
  </head>
  <body background="http://www.dbappdev.com/acs/images/gray.gif">
   <div align="center">
    <font color="navy">
    <h1><script>document.writeln(document.title)</script></h1>
    </font>
    <hr width="90%"/>
   </div>   
	<xsl:apply-templates/>

<br clear="left" />
<a href="index.htm"><b>Home</b></a>
<xsl:text>&#xA;</xsl:text>
<a href="javascript:window.history.go(-1);"><b>Back</b></a>
<xsl:text>&#xA;</xsl:text>
<a href="javascript:window.history.go(1);"><b>Next</b></a>

<div id="footing">
 <br clear="left" />
 <font color="navy">This page powered by <b>JavaScript</b>, <b>ASP</b>, <b>XML</b>, and <b>XSLT</b>.</font>
</div>

  </body>
 </html>
</xsl:template>

<xsl:template match="units/unit">

 <xsl:for-each select="*">

  <xsl:choose>
   <xsl:when test="@name='Organization'">			
    <img src="http://www.dbappdev.com/acs/images/battlecry.jpg"  align="left" vspace="10" hspace="10"/>
   </xsl:when>
   <xsl:when test="@name='Service'">	
    <img SRC="http://www.dbappdev.com/acs/images/charge2.gif"  align="right" />		
   </xsl:when>
  </xsl:choose>

  <h4><xsl:value-of select="@name"/></h4>

  <xsl:for-each select="*/.">


   <xsl:choose>
    <xsl:when test="@type='Occupation'">
     <font color="brown"><xsl:value-of select="."/></font>
    </xsl:when>
    <xsl:when test="@type='Movement'">
     <font color="green"><xsl:value-of select="."/></font>
    </xsl:when>
    <xsl:when test="@type='Action'">
     <font color="red"><xsl:value-of select="."/></font>
    </xsl:when>
    <xsl:when test="@type='Battle'">
     <font color="red"><b><xsl:value-of select="."/></b></font>
    </xsl:when>
    <xsl:when test="@type='Campaign'">
     <font color="navy"><b><xsl:value-of select="."/></b></font>
    </xsl:when>
    <xsl:otherwise>
     <font color="black"><xsl:value-of select="."/></font>
    </xsl:otherwise>
   </xsl:choose>

   <br/>

   <xsl:if test="position()=15">
    <img src="http://www.dbappdev.com/acs/images/ybel1.gif" align="right" valign="top" width="169" height="510" />
   </xsl:if>

  </xsl:for-each>
 </xsl:for-each>
</xsl:template>

<xsl:template match="item">
<h1>hi</h1>
  <xsl:if test="@type=Campaign">			
   <xsl:value-of select="."/><br/>
  </xsl:if>
</xsl:template>

</xsl:stylesheet>