<?xml version="1.0" encoding="UTF-8"?>
<!-- author Tal Broda -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:template match="/">
		<TABLE style="background-color: darkmagenta; color: #000066; border: thin solid black; margin: 20px; padding: 10px; width: 60;">
			<xsl:apply-templates select="address_book/record"/>
		</TABLE>
	</xsl:template>
	<xsl:template match="address_book/record">
		<tr>
			<td>
				<table style="background-color: darkviolet; color: #000066; border: thin solid black; margin: 20px; padding: 10px; width: 470;">
					<xsl:apply-templates select="name"/>
					<xsl:apply-templates select="address"/>
					<xsl:apply-templates select="contact"/>
					<xsl:apply-templates select="comments"/>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="name">
		<tr>
			<td>
				<table style="position: absolute; width: 250px; background-color: blue; font-family: Tahoma; font-size: 14pt; 
					font-weight: bold; color: cyan; padding: 3px; border: thin solid cyan; margin: 10px;">
					<tr>
						<td>
							<xsl:value-of select="first"/>
							<xsl:value-of select="middle"/>
							<xsl:value-of select="last"/>
							<xsl:value-of select="nick"/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="address">
		<tr>
			<td>
				<table style="position: relative; left: 145px; font-size: 12pt; font-family: Tahoma; color: indigo; margin-top: 50px; border: thin solid black; 
					width: 300px; padding: 5px; background-color: aliceblue;">
					<tr>
						<td>
							<div style="position: relative; font-family: Tahoma; font-size: 14pt; font-weight: bold; color: blue; padding-left: 3px;">Address</div>
							<div style="padding-left: 6px;"/>
							<xsl:value-of select="street"/>
							<xsl:value-of select="detail"/>
							<br/>
							<xsl:value-of select="city"/>
							<xsl:value-of select="state"/>
							<br/>
							<xsl:value-of select="country"/>
							<xsl:value-of select="zip"/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="contact">
		<tr>
			<td>
				<table style="position: relative; border: thin solid grey; left: 145px; font-size: 12pt; font-family: Tahoma; color: indigo; margin-top: 5px; border: thin solid black; 
					width: 300px; padding: 5px; background-color: aliceblue;">
					<tr>
						<td>
							<div style="position: relative; font-family: Tahoma; font-size: 14pt; font-weight: bold; color: blue; padding-left: 3px;">Contact info</div>
							<xsl:apply-templates select="phone"/>
							<div style="display: inline; position: relative; font-family: Tahoma; font-size: 12pt; color: blue; padding-left: 6px;">Fax: </div>
							<xsl:value-of select="fax"/>
							<br/>
							<div style="display: inline; position: relative; font-family: Tahoma; font-size: 12pt; color: blue; padding-left: 6px;">eMail: </div>
							<xsl:value-of select="email"/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="phone">
		<div style="display: inline; position: relative; font-family: Tahoma; font-size: 12pt; color: blue; padding-left: 6px;">Home: </div>
		<xsl:value-of select="home"/>
		<br/>
		<div style="display: inline; position: relative; font-family: Tahoma; font-size: 12pt; color: blue; padding-left: 6px;">Work: </div>
		<xsl:value-of select="work"/>
		<br/>
		<div style="display: inline; position: relative; font-family: Tahoma; font-size: 12pt; color: blue; padding-left: 6px;">Cell: </div>
		<xsl:value-of select="cell"/>
		<br/>
	</xsl:template>
	<xsl:template match="comments">
		<tr>
			<td>
				<table style="position: relative; border: thin solid grey; left: 145px; font-size: 12pt; font-family: Tahoma; color: indigo; margin-top: 5px; border: thin solid black; 
					width: 300px; padding: 5px; background-color: aliceblue;">
					<tr>
						<td>
							<div style="position: relative; font-family: Tahoma; font-size: 14pt; font-weight: bold; color: blue; padding-left: 3px;">Comments</div>
							<div style="padding-left: 6px;"/>
							<xsl:value-of select="misc_comments"/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>

