<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<html>
			<head>
				<title>Dictionary</title>
				<style type="text/css">
		body {background-color:cream}
		Table.entry	{background-color:cccc66; width:550px;color: #000066; border: thin solid black; margin-top:5px;}
		TD.heading {font-size: 12pt;padding:5;text-decoration:underline;}
		SPAN.value {font-size:16pt;}
		SPAN.language {font-style:italic;}
	</style>
			</head>
			<body>
				<h2 align="center">Dictionary for XSL</h2>
				<table>
					<xsl:apply-templates select="dictionary/entry"/>
				</table>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="entry">
		<table class="entry">
			<xsl:apply-templates select="word"/>
			<xsl:apply-templates select="grammar"/>
			<xsl:apply-templates select="semantic"/>
		</table>
	</xsl:template>
	<xsl:template match="word">
		<tr>
			<td colspan="2">
				<xsl:apply-templates select="value"/>
				<xsl:apply-templates select="language"/>
				<xsl:apply-templates select="definition"/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="grammar">
		<tr>
			<td colspan="2" class="heading">Grammar</td>
		</tr>
		<xsl:apply-templates select="partofspeech"/>
		<xsl:apply-templates select="quantity"/>
		<xsl:apply-templates select="plural"/>
		<xsl:apply-templates select="comparitive"/>
		<xsl:apply-templates select="superlative"/>
		<xsl:apply-templates select="tense"/>
		<xsl:apply-templates select="form"/>
	</xsl:template>
	<xsl:template match="semantic">
		<tr>
			<td colspan="2" class="heading">Semantic</td>
		</tr>
		<xsl:apply-templates select="parent"/>
		<xsl:apply-templates select="synonym"/>
		<xsl:apply-templates select="meaning"/>
	</xsl:template>
	<xsl:template match="value">
		<span class="value">
			<xsl:value-of select="."/>
		</span>
	</xsl:template>
	<xsl:template match="language">
		<span class="language">
	(<xsl:value-of select="."/>)
	</span>
	</xsl:template>
	<xsl:template match="definition">
		<xsl:value-of select="."/>
	</xsl:template>
	<xsl:template match="partofspeech">
		<tr>
			<td>part of speech:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="quantity">
		<tr>
			<td>quantity:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="plural">
		<tr>
			<td>plural:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="comparitive">
		<tr>
			<td>comparitive:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="superlative">
		<tr>
			<td>superlative:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="tense">
		<tr>
			<td>tense:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="form">
		<tr>
			<td>form:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="parent">
		<tr>
			<td>parent:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="synonym">
		<tr>
			<td>synonym:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="meaning">
		<tr>
			<td>meaning:</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>

