<?xml version="1.0" encoding="UTF-8"?><!-- DWXMLSource="vagts_assg_04b.xml" -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="yes" omit-xml-declaration="yes" method="html" encoding="UTF-8"/>
	<!-- root template; matches root element in the xml sheet -->
	<xsl:template match="country">
		<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<title>Karen Vagts: XML Portfolio - XSL Example No. 2</title>
				<style type="text/css" media="all">
				body {
	font: 10px Arial, Helvetica, sans-serif;
	color: #333333;
	padding: 20px;
	border: thin solid #0000FF;
}
				h1 {
	font: bold 14pt Arial, Helvetica, sans-serif;
	color: #0066CC;
}
				th {
	font: bold 12px Verdana, Arial, Helvetica, sans-serif;
	color: #666666;
	background: #CCCCCC;
	padding: 2px;
	border: 1px solid #666666;
	vertical-align:bottom;
}	
	td {
	font: 10px Verdana, Arial, Helvetica, sans-serif;
	padding: 2px;
	border: 1px solid #666666;
	vertical-align:top;
}
				</style>
		</head>
			<body>
				<!-- Specify the introductory text -->
				<h1><xsl:value-of select="spain/introduction"/></h1>
				<p>Date: <xsl:value-of select="spain/documentDate"/></p>
			<!-- Specify the table layout, with column headers -->
			<h2>Communidad Data</h2>
			<table>
				<tr>
					<th>Community Name</th>
					<th>Community Name (Spanish)</th>
					<th>Capital (Official)</th>
					<th>Provinces</th>
					<th>Languages</th>
					<th>Population</th>
					<th>Area</th>
					<th>Location: Latitude</th>
					<th>Location: Longitude</th>
					<th>ISO Region Code</th>
				</tr>
				<xsl:apply-templates/>
			</table>
	</body>
		</html>
		<!-- End of root template -->
	</xsl:template>
	<!-- Specify templates for table cell contents -->
	<xsl:template match="community">
	<tr>
					<td><strong><xsl:apply-templates select="communname"/></strong></td>
					<td><xsl:apply-templates select="communnames"/></td>
					<td><xsl:apply-templates select="capitals/capitalofficial"/></td>
					<td><xsl:apply-templates select="provinces"/><br /></td>
					<td><xsl:apply-templates select="languages"/></td>
					<td><xsl:apply-templates select="statistics/population"/></td>
					<td><xsl:apply-templates select="statistics/area"/></td>
					<td><xsl:apply-templates select="location/latitude"/></td>
					<td><xsl:apply-templates select="location/longitude"/></td>
					<td><xsl:apply-templates select="isocode"/></td>
				</tr>
	</xsl:template>
	<!-- Specify  that each province name is separated by a line break -->
	<xsl:template match="province">
		<xsl:value-of select="."/><br />
	</xsl:template>
	<!-- Specify  that each language is separated by a line break -->
	<xsl:template match="language">
		<xsl:value-of select="."/><br />
	</xsl:template>
</xsl:stylesheet>