<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html"/>

<xsl:template match="/">
  <html>
    <head>
      <title>UN World Factbook - <xsl:value-of select="/NATIONINFO/NAME"/></title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
      <link rel="stylesheet" href="factbook.css" type="text/css"/>
    </head>
    <body>
      <table align="center" width="800" cellpadding="2">
        <tr>
          <td align="center"><h1><xsl:value-of select="/NATIONINFO/NAME"/></h1></td>
        </tr>
        <tr>
          <td bgcolor="#333333">
            <table align="center" width="100%" cellspacing="0">
              <tr class="topic">
                <td align="center"><h3>Geography</h3></td>
                <td align="left"><h3><xsl:value-of select="/NATIONINFO/NAME"/></h3></td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>Region:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/REGION"/></td>
              </tr>
              <tr class="topic">
                <td align="center"><h3>People</h3></td>
                <td align="left"><h3><xsl:value-of select="/NATIONINFO/NAME"/></h3></td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>Population:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/POPULATION"/>,000,000</td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>Civil rights:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/FREEDOM/CIVILRIGHTS"/></td>
              </tr>
              <tr class="topic">
                <td align="center"><h3>Government</h3></td>
                <td align="left"><h3><xsl:value-of select="/NATIONINFO/NAME"/></h3></td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>Country name:</h4></td>
                <td valign="top" align="left">
                  <i>conventional long form: </i><xsl:value-of select="/NATIONINFO/FULLNAME"/><br/>
                  <i>conventional short form: </i><xsl:value-of select="/NATIONINFO/NAME"/>
                </td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>Government type:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/TYPE"/></td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>UN member?</h4></td>
                <td valign="top" align="left">
                  <xsl:if test="/NATIONINFO/UNSTATUS/text()='UN Member'">
                    Yes
                  </xsl:if>
                  <xsl:if test="/NATIONINFO/UNSTATUS/text()='Non-member'">
                    No
                  </xsl:if>
                </td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>UN category:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/CATEGORY"/></td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>National animal:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/ANIMAL"/></td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>Political freedoms:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/FREEDOM/POLITICALFREEDOM"/></td>
              </tr>
              <tr class="topic">
                <td align="center"><h3>Economy</h3></td>
                <td align="left"><h3><xsl:value-of select="/NATIONINFO/NAME"/></h3></td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>Tax rate:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/TAX"/>%</td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>Currency:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/CURRENCY"/></td>
              </tr>
              <tr class="info">
                <td valign="top" align="right"><h4>Economic freedom:</h4></td>
                <td valign="top" align="left"><xsl:value-of select="/NATIONINFO/FREEDOM/ECONOMY"/></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </body>
  </html>
</xsl:template>

</xsl:stylesheet>
