<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:include href="htmlformat.xml"/> 

	<xsl:template match="/">
		<html>
			<xsl:for-each select="categorylinks">
			<head>
			<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
			<script type="text/javascript">
			_uacct = "UA-482330-5";
			urchinTracker();
			</script>	
					<title>
						<xsl:for-each select="name"><xsl:apply-templates/></xsl:for-each> Resources
					</title>
			</head>
			<body>
			
			<table width="440" border="0" cellpadding="8" cellspacing="0" bgcolor="#ffffff">
							
					      <tr><td>
							<b><font size="4"><xsl:for-each select="name"><xsl:apply-templates/></xsl:for-each> Resources</font></b><br/>
						<xsl:for-each select="image">
              <xsl:if test="string-length(@src)>0">
                <xsl:for-each select="@src">
                                   <img  align="right" vspace="5" hspace="8" border="1">
                                       <xsl:attribute name="src"><xsl:value-of select="." /></xsl:attribute>
                                        <xsl:attribute name="alt"><xsl:value-of select="../alt" /></xsl:attribute>
                                   </img>										
                               </xsl:for-each>
							</xsl:if>
	                    </xsl:for-each>	

							<xsl:for-each select="subcategory">
								<xsl:if test="position()>1"> | </xsl:if>
								<a>
								<xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
								<xsl:for-each select="name"><xsl:apply-templates/></xsl:for-each>
								</a> 
							</xsl:for-each>
		
						<br/>
						
						</td></tr>

							<xsl:for-each select="subcategory">
								<tr><td>
								<a>
								<xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
								</a>		                         
								 							
	    						<b><font size="4"><xsl:for-each select="name"><xsl:apply-templates/></xsl:for-each></font></b><br/>
									<xsl:for-each select="link">
										<a>		
										<xsl:if test="string-length(url)>0">
										    <xsl:attribute name="onClick">javascript:urchinTracker('<xsl:value-of select="url"/>');</xsl:attribute>	
											<xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute>	 
										</xsl:if>               
			    						<xsl:for-each select="name"><xsl:apply-templates/></xsl:for-each>								
										</a><br/>
									</xsl:for-each>	
								</td></tr>
							</xsl:for-each>

				
			</table>

			</body>
			</xsl:for-each>
		</html>
	</xsl:template>
</xsl:stylesheet>

