<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
	<dog>
		<xsl:apply-templates select="canine"/>
	</dog>
</xsl:template>

<xsl:template match="canine">
	<div id='dogtitle'><xsl:value-of select='@title'/></div>
	<br/>
	<xsl:if test="@img!=''">
		<div class='border'>
		<xsl:element name="img">
			<xsl:attribute name="src">profilepics/<xsl:value-of select='@img'/></xsl:attribute>
			<xsl:attribute name="width">280px</xsl:attribute>
		</xsl:element>
		</div>
	</xsl:if>
	<br/>
	<div id='dogdetail'><xsl:value-of select='@name'/></div>
	<br/>
	<div id='comments'><xsl:value-of select='comments'/></div>
	<br/>
	<table class='pedigree'>
		<tr>
			<td rowspan='4' align='center'>
				<xsl:value-of select='@title'/>
			</td>
			<td rowspan='2'><xsl:value-of select="canine[@gender='dog']/@title"/></td><td><xsl:value-of select="canine[@gender='dog']/canine[@gender='dog']/@title"/></td>
		</tr>
		<tr>
			<td><xsl:value-of select="canine[@gender='dog']/canine[@gender='bitch']/@title"/></td>
		</tr>
		<tr>
			<td rowspan='2'><xsl:value-of select="canine[@gender='bitch']/@title"/></td><td><xsl:value-of select="canine[@gender='bitch']/canine[@gender='dog']/@title"/></td>
		</tr>
		<tr>
			<td><xsl:value-of select="canine[@gender='bitch']/canine[@gender='bitch']/@title"/></td>
		</tr>
	</table>
</xsl:template>




</xsl:stylesheet>
