<?xml version="1.0"?>

<!-- apply templates -->
<!-- match element based on the attribute value --> 

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

	<!--================= root template =================-->
	<xsl:template match="/">
		<html>
		<head> 
		<title>apply-templates</title>
		</head> 
		<body bgcolor="white">

		<xsl:apply-templates select="endangered_species/animal"/>

		</body>
		</html>
	</xsl:template>

	<!--================= animal template ======================================-->
	<xsl:template match="animal">
		<p align="center">
		<br/><font size="+3">
			<xsl:apply-templates select="name" />
		</font></p>
		<p>The mighty <b> 
			<xsl:value-of select="name[@language='English']"/> 
		</b> faces numerous threats. For more information
		<a href="http://www.worldwildlife.org/"> click</a>
		</p><hr/>
	</xsl:template>

	<!--=============== name template for language attr = English ===============-->
	<xsl:template match="name[@language='English']">
		<nobr><b>
			<xsl:value-of select="."/>: 
		</b></nobr>
	</xsl:template>

	<!--=============== name template for language attr = Latin ===============-->
	<xsl:template match="name[@language='Latin']">
		<nobr><i>
			<xsl:value-of select="."/>
		</i></nobr>
	</xsl:template>

</xsl:stylesheet>