﻿<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="libraryInfo">
<html>
<head>
	<title>test</title>

</head>
<body>
	<table width="150" border="0" cellspacing="0" cellpadding="2">
	<xsl:apply-templates/>
	</table>
</body>
</html>
</xsl:template>

<xsl:template match="library">
	<tr>
	<td bgcolor="#666600">
		<font face="Lucida Grande" size="-2" color="white">	
		<xsl:value-of select="name"/>
		</font>
		<xsl:choose>
		<xsl:when test="language = 'zh'">
			<xsl:text> </xsl:text>
			<font color="gold" size="-1">
				<xsl:value-of select="language"/>
				<xsl:text> </xsl:text>
				中文
			</font>
		</xsl:when>
		<xsl:when test="language='ru'">
			<xsl:text> </xsl:text>
			<font face="Lucida Grande, Verdana" color="gold" size="-1">
			RU
			</font>
		</xsl:when>
		<xsl:otherwise>
			<font face="Lucida Grande, Verdana" color="gold" size="-1">
			 EN
			</font>	
		</xsl:otherwise>
	</xsl:choose>
	</td>
	</tr>
	<font face="Lucida Grande, Verdana" size="-2">
	<xsl:value-of select="location"/>. <br/>
	Hours: 
	<xsl:value-of select="openHours"/><br/>
	Contact:  
	<xsl:apply-templates select="contact/contactName"/>
<br/>
	<xsl:apply-templates select="contact/contactEmail"/>

	</font>
</xsl:template>

<xsl:template match="contact/contactName">
	<!-- <xsl:for-each select="contactName"> -->
		<!-- <xsl:value-of select="."/> -->
		<xsl:value-of select="firstname"/>
		<xsl:text> </xsl:text>
		<xsl:value-of select="lastname"/>
	<!-- </xsl:for-each> -->
</xsl:template>	

<xsl:template match="contact/contractEmail">
	<xsl:value-of select="contactEmail"/>
</xsl:template>

</xsl:stylesheet>