<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	
	<xsl:template match="/">
		<html>
 			<head>
 				<title>your title</title>
 			</head>
 			<body>
 				<xsl:apply-templates select="*"/>
 			</body>
 		</html>
	</xsl:template>

	<xsl:template match="begin">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:for-each select="module">
						<xsl:apply-templates/>
						<br/>
					</xsl:for-each>
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:for-each select="module">
					<xsl:apply-templates/>
					<br/>
				</xsl:for-each>
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="module">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="moduletype"/>
					<xsl:apply-templates select="declaration"/>
					<br/>
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="moduletype"/>
				<xsl:apply-templates select="declaration"/>
				<br/>
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="moduletype">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<b>MODULE </b>
					<xsl:value-of select="ATOM"/>
					<xsl:if test="boolean(neatomlist)">
						<xsl:apply-templates select="neatomlist"/>
					</xsl:if>
					<br/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<b>MODULE </b>
				<xsl:value-of select="ATOM"/>
				<xsl:if test="boolean(neatomlist)">
					<xsl:apply-templates select="neatomlist"/>
				</xsl:if>
				<br/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="declaration">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:if test="boolean(var)">
						<xsl:apply-templates select="var"/>
					</xsl:if>
					<xsl:if test="boolean(init)">
						<xsl:apply-templates select="init"/>
					</xsl:if>
					<xsl:if test="boolean(trans)">
						<xsl:apply-templates select="trans"/>
					</xsl:if>
					<xsl:if test="boolean(invar)">
						<xsl:apply-templates select="invar"/>
					</xsl:if>
					<xsl:if test="boolean(define)">
						<xsl:apply-templates select="define"/>
					</xsl:if>
					<xsl:if test="boolean(assign)">
						<xsl:apply-templates select="assign"/>
					</xsl:if>
					<br/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:if test="boolean(var)">
					<xsl:apply-templates select="var"/>
				</xsl:if>
				<xsl:if test="boolean(init)">
					<xsl:apply-templates select="init"/>
				</xsl:if>
				<xsl:if test="boolean(trans)">
					<xsl:apply-templates select="trans"/>
				</xsl:if>
				<xsl:if test="boolean(invar)">
					<xsl:apply-templates select="invar"/>
				</xsl:if>
				<xsl:if test="boolean(define)">
					<xsl:apply-templates select="define"/>
				</xsl:if>
				<xsl:if test="boolean(assign)">
					<xsl:apply-templates select="assign"/>
				</xsl:if>
				<br/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="var">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<b>VAR</b>
					<br/>
					<xsl:apply-templates select="vlist"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<b>VAR</b>
				<br/>
				<xsl:apply-templates select="vlist"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="vlist">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="vardecl">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="term"/>
					 : 
					<xsl:apply-templates select="type"/>
					;
					<br/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="term"/>
				 : 
				<xsl:apply-templates select="type"/>
				;
				<br/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="init">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<b>INIT</b>
					<br/>
					<xsl:apply-templates select="expr"/>
					<br/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<b>INIT</b>
				<br/>
				<xsl:apply-templates select="expr"/>
				<br/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="trans">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<b>TRANS</b>
					<br/>
					<xsl:apply-templates select="expr"/>
					<br/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<b>TRANS</b>
				<br/>
				<xsl:apply-templates select="expr"/>
				<br/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="invar">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<b>INVAR</b>
					<br/>
					<xsl:apply-templates select="expr"/>
					<br/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<b>INVAR</b>
				<br/>
				<xsl:apply-templates select="expr"/>
				<br/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="define">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<b>DEFINE</b>
					<br/>
					<xsl:apply-templates select="dlist"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<b>DEFINE</b>
				<br/>
				<xsl:apply-templates select="dlist"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="dlist">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates/>
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates/>
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="dstatement">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="term"/>
					 :=  
					<xsl:apply-templates select="expr"/>
					;
					<br/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="term"/>
				 :=  
				<xsl:apply-templates select="expr"/>
				;
				<br/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="assign">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<b>ASSIGN</b>
					<br/>
					<xsl:apply-templates select="alist"/>
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<b>ASSIGN</b>
				<br/>
				<xsl:apply-templates select="alist"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="alist">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates/>
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates/>
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="astatement">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="alhs"/>
					 :=  
					<xsl:apply-templates select="expr"/>
					;
					<br/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="alhs"/>
				 :=  
				<xsl:apply-templates select="expr"/>
				;
				<br/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="alhs">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:if test="boolean(term)">
						<xsl:apply-templates select="term"/>
					</xsl:if>
					<xsl:if test="boolean(NEXT)">
						<xsl:apply-templates select="NEXT"/>
					</xsl:if>
					<xsl:if test="boolean(SMALLINIT)">
						<xsl:apply-templates select="SMALLINIT"/>
					</xsl:if>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:if test="boolean(term)">
					<xsl:apply-templates select="term"/>
				</xsl:if>
				<xsl:if test="boolean(NEXT)">
					<xsl:apply-templates select="NEXT"/>
				</xsl:if>
				<xsl:if test="boolean(SMALLINIT)">
					<xsl:apply-templates select="SMALLINIT"/>
				</xsl:if>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="SMALLINIT">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					init(
					<xsl:apply-templates select="term"/>
					)					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				init(
				<xsl:apply-templates select="term"/>
				)				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="term">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:if test="boolean(ATOM)">
						<xsl:apply-templates select="ATOM"/>
					</xsl:if>
					<xsl:if test="boolean(DOT)">
						<xsl:apply-templates select="DOT"/>
					</xsl:if>
					<xsl:if test="boolean(arrayelem)">
						<xsl:apply-templates select="arrayelem"/>
					</xsl:if>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:if test="boolean(ATOM)">
					<xsl:apply-templates select="ATOM"/>
				</xsl:if>
				<xsl:if test="boolean(DOT)">
					<xsl:apply-templates select="DOT"/>
				</xsl:if>
				<xsl:if test="boolean(arrayelem)">
					<xsl:apply-templates select="arrayelem"/>
				</xsl:if>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="type">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:if test="boolean(BOOLEAN)">
						<xsl:apply-templates select="BOOLEAN"/>
					</xsl:if>
					<xsl:if test="boolean(neconstlist)">
						<xsl:apply-templates select="neconstlist"/>
					</xsl:if>
					<xsl:if test="boolean(usertype)">
						<xsl:apply-templates select="usertype"/>
					</xsl:if>
					<xsl:if test="boolean(ARRAY)">
						<xsl:apply-templates select="ARRAY"/>
					</xsl:if>
					<xsl:if test="boolean(PROCESS)">
						<xsl:apply-templates select="PROCESS"/>
					</xsl:if>
					<xsl:if test="boolean(subrange)">
						<xsl:apply-templates select="subrange"/>
					</xsl:if>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:if test="boolean(BOOLEAN)">
					<xsl:apply-templates select="BOOLEAN"/>
				</xsl:if>
				<xsl:if test="boolean(neconstlist)">
					<xsl:apply-templates select="neconstlist"/>
				</xsl:if>
				<xsl:if test="boolean(usertype)">
					<xsl:apply-templates select="usertype"/>
				</xsl:if>
				<xsl:if test="boolean(ARRAY)">
					<xsl:apply-templates select="ARRAY"/>
				</xsl:if>
				<xsl:if test="boolean(PROCESS)">
					<xsl:apply-templates select="PROCESS"/>
				</xsl:if>
				<xsl:if test="boolean(subrange)">
					<xsl:apply-templates select="subrange"/>
				</xsl:if>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="BOOLEAN">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					boolean
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				boolean
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="neconstlist">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					{
					<xsl:for-each select="constant">
						<xsl:apply-templates/>
						<xsl:if test="last() != position()">
							,
						</xsl:if>
					</xsl:for-each>
					}					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				{
				<xsl:for-each select="constant">
					<xsl:apply-templates/>
					<xsl:if test="last() != position()">
						,
					</xsl:if>
				</xsl:for-each>
				}				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="usertype">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="ATOM"/>
					<xsl:if test="boolean(neexplist)">
						<xsl:apply-templates select="neexplist"/>
					</xsl:if>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="ATOM"/>
				<xsl:if test="boolean(neexplist)">
					<xsl:apply-templates select="neexplist"/>
				</xsl:if>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="neexplist">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					(
					<xsl:for-each select="expr">
						<xsl:apply-templates/>
						<xsl:if test="last() != position()">
							,
						</xsl:if>
					</xsl:for-each>
					)					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				(
				<xsl:for-each select="expr">
					<xsl:apply-templates/>
					<xsl:if test="last() != position()">
						,
					</xsl:if>
				</xsl:for-each>
				)				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="ARRAY">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					array 
					<xsl:apply-templates select="subrange"/>
					 of 
					<xsl:apply-templates select="type"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				array 
				<xsl:apply-templates select="subrange"/>
				 of 
				<xsl:apply-templates select="type"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="PROCESS">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<b>process </b>
					<xsl:apply-templates select="usertype"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<b>process </b>
				<xsl:apply-templates select="usertype"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="DOT">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="term"/>
					.
					<xsl:apply-templates select="ATOM"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="term"/>
				.
				<xsl:apply-templates select="ATOM"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="arrayelem">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="term"/>
					[
					<xsl:apply-templates select="expr"/>
					]					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="term"/>
				[
				<xsl:apply-templates select="expr"/>
				]				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="expr">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:if test="boolean(term)">
						<xsl:apply-templates select="term"/>
					</xsl:if>
					<xsl:if test="boolean(number)">
						<xsl:apply-templates select="number"/>
					</xsl:if>
					<xsl:if test="boolean(subrange)">
						<xsl:apply-templates select="subrange"/>
					</xsl:if>
					<xsl:if test="boolean(FALSEEXP)">
						<xsl:apply-templates select="FALSEEXP"/>
					</xsl:if>
					<xsl:if test="boolean(TRUEEXP)">
						<xsl:apply-templates select="TRUEEXP"/>
					</xsl:if>
					<xsl:if test="boolean(PAREN)">
						<xsl:apply-templates select="PAREN"/>
					</xsl:if>
					<xsl:if test="boolean(OR)">
						<xsl:apply-templates select="OR"/>
					</xsl:if>
					<xsl:if test="boolean(AND)">
						<xsl:apply-templates select="AND"/>
					</xsl:if>
					<xsl:if test="boolean(NOT)">
						<xsl:apply-templates select="NOT"/>
					</xsl:if>
					<xsl:if test="boolean(CASE)">
						<xsl:apply-templates select="CASE"/>
					</xsl:if>
					<xsl:if test="boolean(NEXT)">
						<xsl:apply-templates select="NEXT"/>
					</xsl:if>
					<xsl:if test="boolean(PLUS)">
						<xsl:apply-templates select="PLUS"/>
					</xsl:if>
					<xsl:if test="boolean(MINUS)">
						<xsl:apply-templates select="MINUS"/>
					</xsl:if>
					<xsl:if test="boolean(TIMES)">
						<xsl:apply-templates select="TIMES"/>
					</xsl:if>
					<xsl:if test="boolean(DIVIDE)">
						<xsl:apply-templates select="DIVIDE"/>
					</xsl:if>
					<xsl:if test="boolean(MOD)">
						<xsl:apply-templates select="MOD"/>
					</xsl:if>
					<xsl:if test="boolean(EQUAL)">
						<xsl:apply-templates select="EQUAL"/>
					</xsl:if>
					<xsl:if test="boolean(LT)">
						<xsl:apply-templates select="LT"/>
					</xsl:if>
					<xsl:if test="boolean(GT)">
						<xsl:apply-templates select="GT"/>
					</xsl:if>
					<xsl:if test="boolean(LE)">
						<xsl:apply-templates select="LE"/>
					</xsl:if>
					<xsl:if test="boolean(GE)">
						<xsl:apply-templates select="GE"/>
					</xsl:if>
					<xsl:if test="boolean(neatomset)">
						<xsl:apply-templates select="neatomset"/>
					</xsl:if>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:if test="boolean(term)">
					<xsl:apply-templates select="term"/>
				</xsl:if>
				<xsl:if test="boolean(number)">
					<xsl:apply-templates select="number"/>
				</xsl:if>
				<xsl:if test="boolean(subrange)">
					<xsl:apply-templates select="subrange"/>
				</xsl:if>
				<xsl:if test="boolean(FALSEEXP)">
					<xsl:apply-templates select="FALSEEXP"/>
				</xsl:if>
				<xsl:if test="boolean(TRUEEXP)">
					<xsl:apply-templates select="TRUEEXP"/>
				</xsl:if>
				<xsl:if test="boolean(PAREN)">
					<xsl:apply-templates select="PAREN"/>
				</xsl:if>
				<xsl:if test="boolean(OR)">
					<xsl:apply-templates select="OR"/>
				</xsl:if>
				<xsl:if test="boolean(AND)">
					<xsl:apply-templates select="AND"/>
				</xsl:if>
				<xsl:if test="boolean(NOT)">
					<xsl:apply-templates select="NOT"/>
				</xsl:if>
				<xsl:if test="boolean(CASE)">
					<xsl:apply-templates select="CASE"/>
				</xsl:if>
				<xsl:if test="boolean(NEXT)">
					<xsl:apply-templates select="NEXT"/>
				</xsl:if>
				<xsl:if test="boolean(PLUS)">
					<xsl:apply-templates select="PLUS"/>
				</xsl:if>
				<xsl:if test="boolean(MINUS)">
					<xsl:apply-templates select="MINUS"/>
				</xsl:if>
				<xsl:if test="boolean(TIMES)">
					<xsl:apply-templates select="TIMES"/>
				</xsl:if>
				<xsl:if test="boolean(DIVIDE)">
					<xsl:apply-templates select="DIVIDE"/>
				</xsl:if>
				<xsl:if test="boolean(MOD)">
					<xsl:apply-templates select="MOD"/>
				</xsl:if>
				<xsl:if test="boolean(EQUAL)">
					<xsl:apply-templates select="EQUAL"/>
				</xsl:if>
				<xsl:if test="boolean(LT)">
					<xsl:apply-templates select="LT"/>
				</xsl:if>
				<xsl:if test="boolean(GT)">
					<xsl:apply-templates select="GT"/>
				</xsl:if>
				<xsl:if test="boolean(LE)">
					<xsl:apply-templates select="LE"/>
				</xsl:if>
				<xsl:if test="boolean(GE)">
					<xsl:apply-templates select="GE"/>
				</xsl:if>
				<xsl:if test="boolean(neatomset)">
					<xsl:apply-templates select="neatomset"/>
				</xsl:if>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="FALSEEXP">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					0
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				0
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="TRUEEXP">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					1
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				1
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="PAREN">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					(
					<xsl:apply-templates select="expr"/>
					)					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				(
				<xsl:apply-templates select="expr"/>
				)				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="OR">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 | 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 | 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="AND">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 &amp;  
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 &amp;  
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="NOT">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					!
					<xsl:apply-templates select="expr"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				!
				<xsl:apply-templates select="expr"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="CASE">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					case
					<br/>
					<xsl:apply-templates/>
					esac					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				case
				<br/>
				<xsl:apply-templates/>
				esac				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="caseentry">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<dd/>
					<xsl:apply-templates select="expr[1]"/>
					 : 
					<xsl:apply-templates select="expr[2]"/>
					;
					<br/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<dd/>
				<xsl:apply-templates select="expr[1]"/>
				 : 
				<xsl:apply-templates select="expr[2]"/>
				;
				<br/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="NEXT">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					next(
					<xsl:apply-templates select="term"/>
					)					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				next(
				<xsl:apply-templates select="term"/>
				)				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="PLUS">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 + 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 + 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="MINUS">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 - 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 - 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="TIMES">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 * 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 * 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="DIVIDE">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 / 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 / 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="MOD">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 mod 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 mod 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="EQUAL">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 = 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 = 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="LT">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 &lt; 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 &lt; 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="GT">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 &gt; 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 &gt; 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="LE">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 &lt;= 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 &lt;= 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="GE">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="expr[1]"/>
					 &gt;= 
					<xsl:apply-templates select="expr[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="expr[1]"/>
				 &gt;= 
				<xsl:apply-templates select="expr[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="neatomset">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					{
					<xsl:for-each select="constant">
						<xsl:apply-templates/>
						<xsl:if test="last() != position()">
							,
						</xsl:if>
					</xsl:for-each>
					}					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				{
				<xsl:for-each select="constant">
					<xsl:apply-templates/>
					<xsl:if test="last() != position()">
						,
					</xsl:if>
				</xsl:for-each>
				}				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="constant">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:if test="boolean(ATOM)">
						<xsl:apply-templates select="ATOM"/>
					</xsl:if>
					<xsl:if test="boolean(number)">
						<xsl:apply-templates select="number"/>
					</xsl:if>
					<xsl:if test="boolean(FALSEEXP)">
						<xsl:apply-templates select="FALSEEXP"/>
					</xsl:if>
					<xsl:if test="boolean(TRUEEXP)">
						<xsl:apply-templates select="TRUEEXP"/>
					</xsl:if>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:if test="boolean(ATOM)">
					<xsl:apply-templates select="ATOM"/>
				</xsl:if>
				<xsl:if test="boolean(number)">
					<xsl:apply-templates select="number"/>
				</xsl:if>
				<xsl:if test="boolean(FALSEEXP)">
					<xsl:apply-templates select="FALSEEXP"/>
				</xsl:if>
				<xsl:if test="boolean(TRUEEXP)">
					<xsl:apply-templates select="TRUEEXP"/>
				</xsl:if>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="subrange">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:apply-templates select="number[1]"/>
					..
					<xsl:apply-templates select="number[2]"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:apply-templates select="number[1]"/>
				..
				<xsl:apply-templates select="number[2]"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="number">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:if test="boolean(NUMBER)">
						<xsl:apply-templates select="NUMBER"/>
					</xsl:if>
					<xsl:if test="boolean(UMINUS)">
						<xsl:apply-templates select="UMINUS"/>
					</xsl:if>
					<xsl:if test="boolean(UPLUS)">
						<xsl:apply-templates select="UPLUS"/>
					</xsl:if>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:if test="boolean(NUMBER)">
					<xsl:apply-templates select="NUMBER"/>
				</xsl:if>
				<xsl:if test="boolean(UMINUS)">
					<xsl:apply-templates select="UMINUS"/>
				</xsl:if>
				<xsl:if test="boolean(UPLUS)">
					<xsl:apply-templates select="UPLUS"/>
				</xsl:if>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="UMINUS">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					-
					<xsl:apply-templates select="NUMBER"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				-
				<xsl:apply-templates select="NUMBER"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="UPLUS">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					+
					<xsl:apply-templates select="NUMBER"/>					
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				+
				<xsl:apply-templates select="NUMBER"/>				
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="NUMBER">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:value-of select="node()"/>
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:value-of select="node()"/>
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="neatomlist">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					(
					<xsl:for-each select="ATOM">
						<xsl:apply-templates/>
						<xsl:if test="last() != position()">
						,
						</xsl:if>
					</xsl:for-each>
					)
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				(
				<xsl:for-each select="ATOM">
					<xsl:apply-templates/>
					<xsl:if test="last() != position()">
					,
					</xsl:if>
				</xsl:for-each>
				)						
			</xsl:when>		
		</xsl:choose>
	</xsl:template>

	<xsl:template match="ATOM">
		<xsl:choose>
			<xsl:when test="boolean(color)">
				<font color="#ff000">
					<xsl:value-of select="node()"/>
				</font>
			</xsl:when>
			<xsl:when test="not(boolean(color))">
				<xsl:value-of select="node()"/>
			</xsl:when>		
		</xsl:choose>
	</xsl:template>	
	
</xsl:stylesheet>
