home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE xsl:stylesheet [
- <!ENTITY % default.oec.entities SYSTEM "http://www.britannica.com/entities/oec/default">
- %default.oec.entities;
- ]>
-
- <xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:html="http://www.w3.org/TR/html4/loose.dtd"
- xmlns:xhtml="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
- exclude-result-prefixes="html xhtml"
- version="1.0">
-
- <xsl:output method="xhtml" omit-xml-declaration="yes" indent="yes" encoding="UTF-8"/>
-
- <!-- default to show nodes unless another template overrides -->
- <xsl:template match="text()|@*"/>
-
- <!-- Document Root -->
- <xsl:template match="/">
- <html>
- <head></head>
- <body leftmargin="0" rightmargin="0">
- <table width="110" border="0">
- <xsl:for-each select="atlasFacts/fact">
- <xsl:call-template name="displayName"/>
- </xsl:for-each>
- </table>
- <xsl:if test="count(descendant::footnote) > 0">
- <hr></hr>
- <table width="110" border="0">
- <xsl:for-each select="(descendant::fact)">
- <xsl:apply-templates select="footnote" mode="summary"/>
- </xsl:for-each>
- </table>
- </xsl:if>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template name="displayName">
- <xsl:choose>
- <xsl:when test="displayName='GNP PER CAPITA IN NOMINAL U.S.$'">
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName">GNP per capita in nominal U.S. $</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="starts-with(displayName, 'ANNUAL ELECTRICITY PRODUCTION (')">
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName">
- <xsl:text disable-output-escaping="yes">
- Annual electricity production in millions KW-HR
- </xsl:text>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="starts-with(displayName, 'TOTAL MILITARY EXPENDITURE (')">
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName">
- <xsl:text disable-output-escaping="yes">
- Total military expenditure in millions U.S.$
- </xsl:text>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <!-- oceans -->
- <xsl:when test="displayName='AREA (000,000 SQ MI)'">
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName">Area (in millions sq mi)</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="displayName='AREA (000,000 SQ KM)'">
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName">Area (in millions sq km)</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="displayName='VOLUME (000,000 CU MI)'">
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName">Volume (in millions cu mi)</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="displayName='VOLUME (000,000 CU KM)'">
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName">Volume (in millions cu km)</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="displayName='MAXIMUM DEPTH (FT)'">
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName">Maximum depth (ft)</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="displayName='MAXIMUM DEPTH (M)'">
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName">Maximum depth (m)</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="profileEntry">
- <xsl:with-param name="viewedName"><xsl:value-of select="displayName"/></xsl:with-param>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="profileEntry">
- <xsl:param name="viewedName"/>
- <tr border="0" >
- <td align="right" width="60" border="0">
- <b><i><font size="10"><xsl:value-of select="$viewedName"/>
- <xsl:if test="number(displayValue/@yearLow) > 0">(<xsl:value-of select="displayValue/@yearLow"/><xsl:if test="number(displayValue/@yearHigh) > 0">-<xsl:value-of select="displayValue/@yearHigh"/></xsl:if>)</xsl:if>
- <xsl:apply-templates select="footnote" mode="count" /></font></i></b></td>
- <td valign="bottom" align="left" width="50" border="0">
- <xsl:choose>
- <xsl:when test="displayValue=0">
- <font size="10">
- <xsl:text>—</xsl:text>
- </font>
- </xsl:when>
- <xsl:otherwise>
- <font size="10">
- <xsl:value-of select="format-number(displayValue, '###,##0.###')"/>
- </font>
- </xsl:otherwise>
- </xsl:choose>
- </td>
-
- </tr>
- </xsl:template>
-
- <xsl:template match="footnote" mode="count">
- <xsl:text>(</xsl:text>
- <xsl:value-of select="count(preceding::footnote) + 1"/>
- <xsl:text>)</xsl:text>
- </xsl:template>
-
- <xsl:template match="footnote" mode="summary">
- <tr>
- <td width="10" border="0"><font size="10"><xsl:value-of select="count(preceding::footnote) + 1"/><xsl:text>)</xsl:text></font></td>
- <td width="140" border="0"><font size="10"><xsl:value-of select="(descendant-or-self::footnote)"/></font></td>
- </tr>
- </xsl:template>
-
- </xsl:stylesheet>
-