<?xml version='1.0'?>
<!--
	Copyright (C) Microsoft Corporation 2003.
	All rights reserved.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

	<xsl:include href='txtdecor.xsl'/>
	<xsl:variable name="g_TextStyle" select="//@textstyle"/>
	
	<xsl:template match="/THES_ARTICLE">
		

			<HTML>
			<HEAD>
				<TITLE><xsl:value-of select='THESAURUS/HEAD'/></TITLE>
			<STYLE>
			BODY
			{
				margin-left:6pt;
				margin-top:3pt;
				margin-right:3pt;
				margin-bottom:3pt;
				<xsl:choose>
					<xsl:when test='$g_TextStyle = 1'>font-size:11pt;line-height:18pt;</xsl:when>
					<xsl:when test='$g_TextStyle = 2'>font-size:14pt;line-height:23pt;</xsl:when>
					<xsl:otherwise>font-size:8pt;line-height:12pt;</xsl:otherwise>
				</xsl:choose>
				font-family:"MS Reference Sans Serif";
				overflow:auto;
			}

			SPAN.DEFINITION
			{
				text-indent:11.25pt;
				<xsl:choose>
					<xsl:when test='$g_TextStyle = 1'>font-size:11pt;line-height:18pt;</xsl:when>
					<xsl:when test='$g_TextStyle = 2'>font-size:14pt;line-height:23pt;</xsl:when>
					<xsl:otherwise>font-size:8pt;line-height:12pt;</xsl:otherwise>
				</xsl:choose>
				font-family:"MS Reference Sans Serif";
			}

			SPAN.firstword
			{
				color:#0000ff;
				font-weight:bold;
				<!--cursor:hand;-->
			}
			td.headword
			{
				<xsl:choose>
					<xsl:when test='$g_TextStyle = 1'>font-size:19pt;</xsl:when>
					<xsl:when test='$g_TextStyle = 2'>font-size:21pt;</xsl:when>
					<xsl:otherwise>font-size:16pt;</xsl:otherwise>
				</xsl:choose>
				font-family:"MS Reference Sans Serif";

			}
			td.part_of_speech
			{
				position:relative;
				<xsl:choose>
					<xsl:when test='$g_TextStyle = 1'>font-size:11pt;</xsl:when>
					<xsl:when test='$g_TextStyle = 2'>font-size:14pt;</xsl:when>
					<xsl:otherwise>font-size:8pt;line-height:12pt;</xsl:otherwise>
				</xsl:choose>
				font-family:"MS Reference Sans Serif";
				color:#707070;
				top:2pt;
			}
			div.headword_rule
			{
				font-size:0.75pt;
				border=0pt solid #8E8E8E; 
				border-top-width:0.75pt; 
				margin-top:4.5pt;
				margin-bottom:4.5pt;
				
			}
			</STYLE>

			<!--<script src="msencdata:$$XSLPATH\mediascript.js"></script>-->

			</HEAD>
			<BODY>

			
			<xsl:apply-templates/>
			
			<!--<span id="MsEncartaURL" style="display:none" onclick="this.innerText=window.external.GetMsEncartaURL()"></span>-->
			
			</BODY>
			</HTML>

		
	</xsl:template>
	
	<xsl:template match="THESAURUS"><div><xsl:apply-templates/></div></xsl:template>
	
	<xsl:template match="HEAD">
		<table cellspacing="0" cellpadding="0" border="0">
			<tr><td class="headword">
				<xsl:apply-templates/>
			</td><td style="width:6pt;">
			</td><td class="part_of_speech">
				(<xsl:choose><xsl:when test="@TYPE='synonym'"><xsl:value-of select="@POS"/></xsl:when><xsl:otherwise><xsl:value-of select="@TYPE"/></xsl:otherwise></xsl:choose>)
			</td></tr>
		</table>
		<div class="headword_rule"></div>
	</xsl:template>

	<xsl:template match="BODY">
		<div style="padding-bottom:12pt;">
		<xsl:choose>
				<xsl:when test="SENSE [2]">
						<xsl:apply-templates>
							<xsl:with-param name="in_list">1</xsl:with-param>
						</xsl:apply-templates>
				</xsl:when>
				<xsl:otherwise>
					<xsl:apply-templates/>
				</xsl:otherwise>
			</xsl:choose>
		</div>
	</xsl:template>
	
	<xsl:template match="SENSE">
	<xsl:param name="in_list" select="0"/>
		<div style="padding-bottom:4.75pt;">
			<xsl:choose>
				<xsl:when test="$in_list='1'">
					<LI><xsl:apply-templates/></LI>
				</xsl:when>
				<xsl:otherwise>
					<xsl:apply-templates/>
				</xsl:otherwise>
			</xsl:choose>
		</div>
	</xsl:template>


	<xsl:template match="SYNONYMGROUP">
		<span><xsl:apply-templates/></span>
	</xsl:template>
	
	<xsl:template match="SUBTYPE">
		<B><xsl:apply-templates/><xsl:text>: </xsl:text></B>
	</xsl:template>
	<xsl:template match="SYNONYM">
		<xsl:choose>
			<xsl:when test="@TargetRefID">
				<span class="firstword">
					<!--
					<xsl:attribute name="onclick">
						window.external.onDoubleClick("<xsl:value-of select="."/>");
					</xsl:attribute>
					-->
					<xsl:apply-templates/>
				</span>
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates/>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:if test="@REGISTER!='standard'">
		<xsl:text> (</xsl:text><xsl:if test="@DIALECT != 'Both'"><xsl:value-of select="@DIALECT"/><xsl:text>, </xsl:text></xsl:if><xsl:value-of select="@REGISTER"/>)</xsl:if>
		<xsl:if test="position()!=last()"><xsl:text>, </xsl:text></xsl:if>
	</xsl:template>

	<xsl:template match="ANTONYMGROUP">
		<div>
			<I><B>
				<xsl:choose>
					<xsl:when test="ANTONYM [2]">
						<xsl:text>antonyms: </xsl:text>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>antonym: </xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</B></I>
			<xsl:apply-templates/>
		</div>
	</xsl:template>
	
	<xsl:template match="ANTONYM">
		<xsl:choose>
			<xsl:when test="@TargetRefID">
				<span class="firstword">
					<!--
					<xsl:attribute name="onclick">
						window.external.onDoubleClick("<xsl:value-of select="."/>");
					</xsl:attribute>
					-->
					<xsl:apply-templates/>
				</span>
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates/>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:if test="@REGISTER!='standard'">
		<xsl:text> (</xsl:text><xsl:if test="@DIALECT != 'Both'"><xsl:value-of select="@DIALECT"/><xsl:text>, </xsl:text></xsl:if><xsl:value-of select="@REGISTER"/>)</xsl:if>
		<xsl:if test="position()!=last()"><xsl:text>, </xsl:text></xsl:if>
	</xsl:template>

	<xsl:template match="B"><B><xsl:apply-templates/></B></xsl:template>
	<xsl:template match="I"><I><xsl:apply-templates/></I></xsl:template>
	<xsl:template match="BR"><BR/></xsl:template>
	<xsl:template match="text()"><xsl:value-of select="."/></xsl:template>
	<xsl:template match="BUILD_REFIDS"/>
</xsl:stylesheet>
					
