home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <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"
- xmlns:str="http://exslt.org/strings"
- exclude-result-prefixes="html xhtml"
- version="1.0">
-
- <xsl:import href="basePage.xsl"/>
- <xsl:import href="Variables.xsl"/>
- <xsl:import href="RefLinks.xsl"/>
- <xsl:import href="ContentTags.xsl"/>
- <xsl:import href="/xsl/shared/Section.xsl"/>
- <!-- xsl:import href="ArticleRefLinks.xsl"/ -->
-
- <xsl:output method="html" omit-xml-declaration="yes" indent="no" encoding="UTF-8"/>
-
- <xsl:param name="tocId"/>
- <xsl:param name="articleId"/>
- <xsl:param name="ct"/>
- <xsl:param name="articleType"/>
- <xsl:param name="relatedContentMenu"/>
- <xsl:param name="hasToc">false</xsl:param>
-
- <!-- Locale-dependent strings -->
- <xsl:param name="locale"/>
-
- <xsl:variable name="artId"><xsl:value-of select="$articleId"/></xsl:variable><!-- used in RefLinks.xsl -->
-
- <xsl:variable name="highlightQuery"><xsl:value-of select="/article/queryStr/text()"/></xsl:variable>
- <xsl:variable name="mUrl"><xsl:value-of select="/article/mUrl/text()"/></xsl:variable>
- <xsl:variable name="prodName"><xsl:value-of select="/article/prodName/text()"/></xsl:variable>
-
- <xsl:variable name="sourceName">
- <xsl:choose>
- <xsl:when test="$ct = 'EBI'"><xsl:value-of select="$ebiLibraryText"/></xsl:when>
- <xsl:when test="$ct = 'EBK'"><xsl:value-of select="$ebkLibraryText"/></xsl:when>
- <xsl:when test="$ct = 'CONCISE'"><xsl:value-of select="$conciseLibraryText"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$ebLibraryText" disable-output-escaping="yes"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="pageSubheading">
- <xsl:choose>
- <xsl:when test="$articleType = 'BBOY'"><xsl:value-of select="$bboyArticleText"/></xsl:when>
- <xsl:when test="$ct = 'EBI'"><xsl:value-of select="$ebiArticleText"/></xsl:when>
- <xsl:when test="$ct = 'EBK'"><xsl:value-of select="$ebkArticleText"/></xsl:when>
- <xsl:when test="$ct = 'CONCISE'"><xsl:value-of select="$conciseArticleText"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$ebArticleText" disable-output-escaping="yes"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="mmbintype">|7|8|9|13|20|25|</xsl:variable>
-
- <xsl:template match="/">
- <xsl:call-template name="pageTemplate">
- <xsl:with-param name="pageTitle"><xsl:call-template name="pageHeading"/></xsl:with-param>
- <xsl:with-param name="pageHeading"><xsl:call-template name="pageHeading"/></xsl:with-param>
- <xsl:with-param name="pageSubheading"><xsl:value-of select="$pageSubheading"/></xsl:with-param>
- <xsl:with-param name="pageBody"><xsl:apply-templates select="article"/></xsl:with-param>
- <xsl:with-param name="relatedContentMenu"><xsl:value-of select="$relatedContentMenu"/></xsl:with-param>
- <xsl:with-param name="articleId"><xsl:value-of select="$articleId"/></xsl:with-param>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template match="article">
- <xsl:apply-templates select="h0|h1|h2|h3|h4|h5"/>
- <xsl:call-template name="backToTop"/>
- <xsl:choose>
- <xsl:when test="$ct = 'CONCISE'">
- <br/>
- <span class="upsell">
- <xsl:value-of select="$upsellText" disable-output-escaping="yes"/><xsl:text> </xsl:text>
- <a href="javascript:shopurl"><xsl:value-of select="$upsellLinkText" disable-output-escaping="yes"/></a>.
- </span>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
-
- <xsl:call-template name="citation"/>
- </xsl:template>
-
-
- <xsl:template name="pageHeading">
- <xsl:choose>
- <xsl:when test="//tabbrev">
- <xsl:apply-templates select="//title" mode="heading"/> (<xsl:apply-templates select="//tabbrev"/>)
- </xsl:when>
- <xsl:when test="//taxon[@ty='species']">
- <xsl:apply-templates select="//title" mode="heading"/> <i><xsl:apply-templates select="//taxon[@ty='species']"/></i>
- </xsl:when>
- <xsl:when test="//taxon[@ty='genus']">
- <xsl:apply-templates select="//title" mode="heading"/> <i><xsl:apply-templates select="//taxon[@ty='genus']"/></i>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="//title" mode="heading"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="//titlsub">
- <xsl:apply-templates select="//titlsub"/>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="title"/>
-
- <xsl:template match="title" mode="heading">
- <xsl:choose>
- <xsl:when test="starts-with(../articleinfo/@contenttype, 'boy')">
- <div>Year in Review <xsl:value-of select="number(substring(../articleinfo/@contenttype, 4, 4)) - number(1)"/></div>
- <xsl:text> </xsl:text>
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="titltxt"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="info">
- <div class="info"><xsl:apply-templates/></div>
- </xsl:template>
-
- <xsl:template match="datatype | datavalue">
- <div class="data"><xsl:apply-templates/></div>
- </xsl:template>
-
- <xsl:template match="sig">
- <div class="sig"><xsl:apply-templates/></div>
- </xsl:template>
-
- <xsl:template match="headingElements">
- <xsl:if test="heading">
- <div class="headingElements"><xsl:for-each select="heading">
- <xsl:sort select="level"/>
- <xsl:if test="position() > 1" > > </xsl:if>
- <xsl:apply-templates select="xmlTitle"/>
- </xsl:for-each></div>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="authorblurb">
- <span class="authorblurb"><xsl:apply-templates/></span>
- </xsl:template>
-
- <xsl:template match="charundef">
- <xsl:value-of select="@char"/>
- </xsl:template>
-
-
- <xsl:template match="inline">
- <xsl:choose>
- <xsl:when test="@display = 'baseline'">
- <xsl:apply-templates select="asset" mode="baseline"/>
- </xsl:when>
- <xsl:when test="@display = 'centered'">
- <xsl:apply-templates select="asset" mode="centered"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="asset" mode="below"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="asset">
- <a class="asset">
- <xsl:attribute name="href"><xsl:value-of select="$assemblyURL"/>?assemblyId=<xsl:value-of select="@id"/>&type=I</xsl:attribute>
- <xsl:apply-templates/>
- </a>
- </xsl:template>
-
- <xsl:template match="asset" mode="baseline">
- <xsl:call-template name="regular_fullsize">
- <xsl:with-param name="class" select="baseline"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template match="asset" mode="centered">
- <xsl:call-template name="regular_fullsize">
- <xsl:with-param name="class" select="centered"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template match="asset" mode="below">
- <div class="centeredImg">
- <xsl:call-template name="regular_fullsize"/>
- </div>
- </xsl:template>
-
- <xsl:template name="regular_thumb">
- <img class="thumb">
- <xsl:attribute name="width"><xsl:value-of select="@thumbwdth"/></xsl:attribute>
- <xsl:attribute name="height"><xsl:value-of select="@thumbhgt"/></xsl:attribute>
- <xsl:attribute name="src"><xsl:value-of select="$thumbURL"/>?binaryId=<xsl:value-of select="@id"/></xsl:attribute>
- <xsl:attribute name="alt"><xsl:value-of select="@mediatype"/><xsl:if test="../thumbcap">:<xsl:value-of select="../thumbcap"/></xsl:if></xsl:attribute>
- </img>
- </xsl:template>
-
- <xsl:template name="regular_fullsize">
- <xsl:param name="alt"/>
- <xsl:param name="class"/>
- <img>
- <xsl:if test="$class != ''">
- <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="width"><xsl:value-of select="@wdth"/></xsl:attribute>
- <xsl:attribute name="height"><xsl:value-of select="@hgt"/></xsl:attribute>
- <xsl:attribute name="alt"><xsl:choose><xsl:when test="$alt='flag'">flag</xsl:when><xsl:otherwise><xsl:value-of select="@mediatype"/><xsl:if test="../thumbcap">:<xsl:value-of select="../thumbcap"/></xsl:if></xsl:otherwise></xsl:choose></xsl:attribute>
- <xsl:attribute name="src"><xsl:value-of select="$inlineImageURL"/>?binaryId=<xsl:value-of select="@id"/></xsl:attribute>
- </img>
- </xsl:template>
-
- <xsl:template match="gist/gistxt">
- <p class="gist">
- <xsl:apply-templates/>
- </p>
- </xsl:template>
-
- <xsl:template match="formula">
- <div class="formula"><xsl:apply-templates/></div>
- </xsl:template>
-
- <xsl:template match="num">
- <sup><xsl:apply-templates/></sup>
- </xsl:template>
-
- <xsl:template match="den">
- <sub><xsl:apply-templates/></sub>
- </xsl:template>
-
- <xsl:template match="frac">
- <span class="fraction"><sup><xsl:apply-templates select="num"/></sup>/<sub><xsl:apply-templates select="den"/></sub></span>
- </xsl:template>
-
- <xsl:template match="sup|upper">
- <xsl:variable name="mathLetter"><xsl:apply-templates/></xsl:variable>
- <xsl:variable name="upperLetter" select="translate($mathLetter,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
- <xsl:variable name="vclass">
- <xsl:choose>
- <xsl:when test="number() = number()">numbersub</xsl:when>
- <xsl:when test="$mathLetter = $upperLetter">numbersub</xsl:when>
- <xsl:otherwise>supandsub</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <span class="$vclass"><sup><xsl:apply-templates/></sup></span>
- </xsl:template>
-
- <xsl:template match="sub|lower">
- <xsl:variable name="mathLetter"><xsl:apply-templates/></xsl:variable>
- <xsl:variable name="upperLetter" select="translate($mathLetter,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
- <xsl:variable name="vclass">
- <xsl:choose>
- <xsl:when test="number() = number()">numbersub</xsl:when>
- <xsl:when test="$mathLetter = $upperLetter">numbersub</xsl:when>
- <xsl:otherwise>supandsub</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <span class="{$vclass}"><sub><xsl:apply-templates/></sub></span>
- </xsl:template>
-
- <xsl:template match="tbl" mode="thumb">
- <xsl:apply-templates select="." mode="thumblink"/>
- </xsl:template>
-
- <xsl:template match="tbl" mode="thumblink">
- <a class="thumbLink">
- <xsl:attribute name="href"><xsl:value-of select="$tableArticleURL"/>?tocId=<xsl:value-of select="@tocid"/></xsl:attribute>
- <xsl:for-each select=".">
- <xsl:if test="position() = 1">
- <xsl:call-template name="table_thumb"/>
- </xsl:if>
- </xsl:for-each>
- </a>
- </xsl:template>
-
- <xsl:template name="table_thumb">
- <img class="tableThumb">
- <xsl:attribute name="width"><xsl:value-of select="@thumbwdth"/></xsl:attribute>
- <xsl:attribute name="height"><xsl:value-of select="@thumbhgt"/></xsl:attribute>
- <xsl:attribute name="src">
- <xsl:value-of select="$thumbURL"/>?binaryId=<xsl:value-of select="@assetid"/>
- </xsl:attribute>
- <xsl:attribute name="alt"><xsl:value-of select="."/></xsl:attribute>
- </img>
- </xsl:template>
-
- <xsl:template match="tbl">
- <a class="tableLink">
- <xsl:choose>
- <xsl:otherwise>
- <xsl:attribute name="href"><xsl:value-of select="$tableArticleURL"/>?tocId=<xsl:value-of select="@tocid"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates/>
- </a>
- </xsl:template>
-
- <xsl:template match="byline">
- <div class="byline">by <xsl:apply-templates/></div>
- </xsl:template>
-
- <xsl:template match="prefnote">
- <div class="prefnote"><xsl:apply-templates/></div>
- </xsl:template>
-
- <xsl:template match="classicbody">
-
- <!-- it's important to implement the following tag exactly, as it will later be matched in a regular expression -->
- <classic tocid="{@tocid}"></classic>
- </xsl:template>
-
- <!-- needed to get the correct character from our new font -->
- <xsl:template match="sqroot">
- <xsl:variable name="multiterm">
- <span class="formula"><xsl:apply-templates/></span>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="@radix=2 or not(@radix)"></xsl:when>
- <xsl:when test="@radix=n"><sup><i><xsl:value-of select="@radix"/></i></sup></xsl:when>
- <xsl:otherwise><sup><xsl:value-of select="@radix"/></sup></xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="contains($multiterm,'+') or contains($multiterm,'-') or contains($multiterm,'−')">
- √(<xsl:apply-templates/>)
- </xsl:when>
- <xsl:otherwise>√<xsl:apply-templates/></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template match="p">
- <p>
- <xsl:if test="descendant::asset[not(parent::inline) and @thumbwdth > 0]">
- <xsl:apply-templates select="descendant::assembly" mode="thumb"/>
- </xsl:if>
- <xsl:if test="descendant::tbl[@assetid]">
- <xsl:apply-templates select="descendant::tbl" mode="thumb"/>
- </xsl:if>
-
- <xsl:apply-templates/>
- <xsl:choose>
- <xsl:when test="not(following-sibling::p)"><div class="clear"> </div></xsl:when>
- <xsl:when test="following-sibling::p[position() = 1]/descendant::asset[not(parent::inline) and @thumbwdth > 0]"><div class="clear"> </div></xsl:when>
- </xsl:choose>
- </p>
- </xsl:template>
-
-
- <xsl:template match="fpartxt">
- <div class="h1">
- <p>
- <xsl:if test="..//asset[not(parent::inline) and @thumbwdth > 0]">
- <xsl:apply-templates select="..//assembly" mode="thumb"/>
- </xsl:if>
- <xsl:if test="descendant::tbl[@assetid]">
- <xsl:apply-templates select="descendant::tbl" mode="thumb"/>
- </xsl:if>
-
- <xsl:if test="//tvtype | //tvarint | //tvcnjtive">
- <i><xsl:apply-templates select="//tvtype | //tvarint | //tvcnjtive" mode="tvar"/></i>
- </xsl:if>
-
- <xsl:apply-templates/>
-
- <xsl:choose>
- <xsl:when test="not(parent::node()/following-sibling::p)"><div class="clear"> </div></xsl:when>
- <xsl:when test="parent::node()/following-sibling::p[position() = 1]/descendant::asset[not(parent::inline) and @thumbwdth > 0]"><div class="clear"> </div></xsl:when>
- </xsl:choose>
- </p>
- </div>
- </xsl:template>
-
-
- <xsl:template match="chronology">
- <xsl:variable name="formated">
- <xsl:value-of select="concat(translate(substring(@month,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'),substring(@month,2))"/>
- </xsl:variable>
-
- <div class="h1">
- <h2><xsl:attribute name="id"><xsl:value-of select="@tocid"/>.toc</xsl:attribute><xsl:value-of select="$formated"/></h2>
- <xsl:apply-templates/>
- </div>
- </xsl:template>
-
- <xsl:template match="chronquote">
- <blockquote class="chronquote">
- "<xsl:apply-templates select="initquote"/>"
- <div class="quotesource">— <xsl:apply-templates select="quotesource"/></div>
- </blockquote>
- </xsl:template>
-
- <xsl:template match="cdate">
- <xsl:variable name="month">
- <xsl:value-of select="parent::chronology/@month"/>
- </xsl:variable>
-
- <xsl:variable name="formated">
- <xsl:value-of select="concat(translate(substring($month,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'),substring($month,2))"/>
- </xsl:variable>
-
- <div class="h2">
- <h3><xsl:value-of select="$formated"/><xsl:text> </xsl:text><xsl:value-of select="@value"/></h3>
- <p><xsl:apply-templates/></p>
- </div>
- </xsl:template>
-
-
- <xsl:template match="assembly">
- <xsl:if test="arttext">
- <a class="artText">
- <xsl:choose>
- <xsl:when test="contains($mmbintype, concat('|',asset/@bintype,'|'))">
- <xsl:attribute name="href"><xsl:value-of select="$assemblyMultimediaURL"/>?assemblyId=<xsl:value-of select="@id"/>&type=M</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="href"><xsl:value-of select="$assemblyURL"/>?assemblyId=<xsl:value-of select="@id"/>&type=A</xsl:attribute>
- </xsl:otherwise>
-
- </xsl:choose>
- <xsl:apply-templates select="arttext"/>
- </a>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="assembly" mode="thumb">
-
- <xsl:variable name="url">
- <xsl:choose>
- <xsl:when test="asset/@flaghisttocid > '0'"><xsl:value-of select="$articleURL"/></xsl:when>
- <xsl:when test="asset/@mediatype='Map/Still'"><xsl:value-of select="$assemblyAtlasURL"/></xsl:when>
- <xsl:when test="asset/@bintype > 2"><xsl:value-of select="$assemblyMultimediaURL"/></xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$assemblyURL"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="flagTOC">
- <xsl:value-of select="asset/@flaghisttocid"/>
- </xsl:variable>
-
-
- <div class="assembly">
- <a class="asset">
- <xsl:choose>
- <xsl:when test="asset[@flaghisttocid != '']">
- <xsl:attribute name="href"><xsl:value-of select="$url"/>?articleId=<xsl:value-of select="$flagTOC - 9000000"/>&library=<xsl:value-of select="$ct"/>&query=<xsl:value-of select="$highlightQuery"/>#<xsl:value-of select="asset/@flaghisttocid"/>.toc</xsl:attribute>
- </xsl:when>
- <xsl:otherwise><xsl:attribute name="href"><xsl:value-of select="$url"/>?assemblyId=<xsl:value-of select="@id"/>&type=A</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:for-each select="asset">
- <xsl:if test="position() = 1">
- <xsl:choose>
- <xsl:when test="@thumbwdth > 0">
- <xsl:call-template name="regular_thumb"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@mediatype"/>
- </xsl:otherwise>
- </xsl:choose>
- <div class="clear"> </div>
- </xsl:if>
- </xsl:for-each>
- </a>
- <ul class="captions">
- <xsl:apply-templates select="thumbcap">
- <xsl:with-param name="parsed">true</xsl:with-param>
- </xsl:apply-templates>
- <xsl:apply-templates select="thumbcred">
- <xsl:with-param name="parsed">true</xsl:with-param>
- </xsl:apply-templates>
- </ul>
- </div>
- </xsl:template>
-
-
- <xsl:template match="thumbcap">
- <xsl:param name="parsed"></xsl:param>
- <xsl:if test="$parsed != ''">
- <li class="thumbcap"><xsl:apply-templates/></li>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="thumbcred">
- <xsl:param name="parsed"></xsl:param>
- <xsl:if test="$parsed != ''">
- <xsl:variable name="credtext" select="."/>
- <xsl:variable name="tokenizedtext" select="str:tokenize($credtext,' ')"/>
- <xsl:variable name="displaytext">
- <xsl:for-each select="$tokenizedtext">
- <xsl:variable name="token" select="."/>
- <xsl:if test="string-length($token) > 18">
- false
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="not($displaytext)"><!-- Suppress display of thumbcred with long words -->
- <li class="thumbcred"><xsl:apply-templates/></li>
- </xsl:if>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="authcr">
- <!-- surpress the author link if it's editor of EB -->
- <xsl:if test="not(@persid='4419') and @persid != ''">
- <a class="authcr">
- <xsl:attribute name="href"><xsl:value-of select="$authorURL"/>?authorId=<xsl:value-of select="@persid"/></xsl:attribute>
- <xsl:apply-templates/>
- </a>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="signature">
- <a class="signature">
- <xsl:attribute name="href"><xsl:value-of select="$authorURL"/>?authorId=<xsl:value-of select="@persid"/></xsl:attribute>
- <xsl:apply-templates/>
- </a>
- </xsl:template>
-
- <xsl:template match="bdate">
- <div class="bdate">
- <xsl:if test="//firstpar/pairbio and position() = 1">
- Respectively, <div class="clear"> </div>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="@ty='fl'"> flourished </xsl:when>
- <xsl:when test="@ty='bap'"> baptized </xsl:when>
- <xsl:otherwise> born </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates/>
- <div class="clear"> </div>
- </div>
- </xsl:template>
-
-
- <xsl:template match="ddate">
- <div class="ddate">
- <xsl:choose>
- <xsl:when test="@ty='kill'"> killed in action </xsl:when>
- <xsl:when test="@ty='bur'"> buried </xsl:when>
- <xsl:when test="@ty='found'"> found dead </xsl:when>
- <xsl:otherwise> died </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates/>
- </div>
- </xsl:template>
-
- <xsl:template match="headtitle">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="h0">
- <a><xsl:attribute name="id"><xsl:value-of select="@tocid"/>.toc</xsl:attribute></a>
- <xsl:if test="count(//headtitle) > 1">
- <h2>Introduction</h2>
- </xsl:if>
- <xsl:apply-templates select="*[name() != 'headtitle']"/>
- </xsl:template>
-
- <xsl:template match="h1">
- <div class="h1">
- <xsl:if test="headtitle">
- <h2>
- <xsl:attribute name="id"><xsl:value-of select="@tocid"/>.toc</xsl:attribute>
- <xsl:apply-templates select="headtitle"/>
- </h2>
- </xsl:if>
- <xsl:apply-templates select="*[name() != 'headtitle']"/>
- </div>
- </xsl:template>
-
- <xsl:template match="h2">
- <div class="h2">
- <h3>
- <xsl:attribute name="id"><xsl:value-of select="@tocid"/>.toc</xsl:attribute>
- <xsl:apply-templates select="headtitle"/>
- </h3>
- <xsl:apply-templates select="*[name() != 'headtitle']"/>
- </div>
- </xsl:template>
-
- <xsl:template match="h3">
- <div class="h3">
- <h4>
- <xsl:attribute name="id"><xsl:value-of select="@tocid"/>.toc</xsl:attribute>
- <xsl:apply-templates select="headtitle"/>
- </h4>
- <xsl:apply-templates select="*[name() != 'headtitle']"/>
- </div>
- </xsl:template>
-
- <xsl:template match="h4">
- <div class="h3">
- <h5>
- <xsl:attribute name="id"><xsl:value-of select="@tocid"/>.toc</xsl:attribute>
- <xsl:apply-templates select="headtitle"/>
- </h5>
- <xsl:apply-templates select="*[name() != 'headtitle']"/>
- </div>
- </xsl:template>
-
- <xsl:template match="h5">
- <div class="h5">
- <h6>
- <xsl:attribute name="id"><xsl:value-of select="@tocid"/>.toc</xsl:attribute>
- <xsl:apply-templates select="headtitle"/>
- </h6>
- <xsl:apply-templates select="*[name() != 'headtitle']"/>
- </div>
- </xsl:template>
-
- <xsl:template match="uninvrtitl">
- <span class="uninvrtitl"><xsl:apply-templates/></span>
- </xsl:template>
-
- <xsl:template match="list">
- <div class="list">
- <xsl:choose>
- <!-- formatting provided in content -->
- <xsl:when test="@numsty='e'">
- <ul style="list-item-type: none;"><xsl:apply-templates/></ul>
- </xsl:when>
- <!-- bullets -->
- <xsl:when test="@numsty='u'">
- <ul><xsl:apply-templates/></ul>
- </xsl:when>
- <!-- uppercase letters -->
- <xsl:when test="@numsty='a'">
- <ol type="A"><xsl:apply-templates/></ol>
- </xsl:when>
- <!-- numbered -->
- <xsl:otherwise>
- <ol type="1"><xsl:apply-templates/></ol>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:template>
-
-
- <xsl:template name="citation">
-
- <div id="cite">
-
- <h2 class="citationHead">
- <span class="text"><xsl:value-of select="$citeText" /></span>
- </h2>
- <ul class="citations">
- <li>
- <i><xsl:value-of select="$mlaStyleText" />:</i>
- <div class="clear"> </div>
- <b>"<xsl:call-template name="pageHeading"/>." </b>
- <xsl:value-of select="$sourceName" disable-output-escaping="yes"/>.
- <u><xsl:value-of select="$prodName"/></u>.
- <xsl:value-of select="$chicagoText" /> <xsl:value-of select="$britannicaText" disable-output-escaping="yes"/>, <script>document.write(new Date().getFullYear());</script>.
- </li>
- <li>
- <i><xsl:value-of select="$apaStyleText" />:</i>
- <div class="clear"> </div>
- <b><xsl:call-template name="pageHeading"/>. </b>
- (<script>document.write(new Date().getFullYear());</script>).
- <xsl:value-of select="$sourceName" disable-output-escaping="yes"/>.
- <i><xsl:value-of select="$prodName"/>.</i>
- <xsl:value-of select="$chicagoText" /> <xsl:value-of select="$britannicaText" disable-output-escaping="yes" />.
- </li>
- <li>
- <i><xsl:value-of select="$britannicaStyleText" /></i>
- <div class="clear"> </div>
- <b>"<xsl:call-template name="pageHeading"/>." </b>
- <xsl:value-of select="$sourceName" disable-output-escaping="yes"/> <xsl:value-of select="$fromText"/> <i><xsl:value-of select="$prodName"/>.</i>
- (<script>document.write(new Date().getFullYear());</script>).
- </li>
- </ul>
- </div>
- <div class="clear"> </div>
- </xsl:template>
-
- <xsl:template name="sidebar">
- <div id="sidebarTitleBar">
- <span id="sideBarTitleTOC"><xsl:value-of select="$tableOfContentsText"/></span>
- <span id="sideBarTitleNotes"><xsl:value-of select="$notesViewerText"/></span>
- <span id="sideBarTitleLoading"><xsl:value-of select="$loadingText" /></span>
- <a id="closeSidebarButton" onclick="hideSideBar();"><span class="linkLabel">Close</span></a>
- </div>
-
- <div id="sidebarContent" class="content">
- <div id="articleToc">
- </div>
- <div id="articleNotes">
- <ul id="notesViewerList">
- </ul>
- <input type="hidden" id="notesToDelete" value=""/>
- <a id="notesViewerDeleteButton" style="display: none;" onclick="deleteNotes();"><xsl:attribute name="href">annotate:deleteNotes?articleId=<xsl:value-of select="$articleId"/></xsl:attribute><span class="buttonLabel">Delete Selected Notes</span></a>
- </div>
- </div>
- </xsl:template>
-
- <xsl:template name="notesButton">
- <li id="notesButton" class="menuContainer">
- <a class="menuButton toolbarButton" onmouseout="hideTip();">
- <xsl:attribute name="onmouseover">showTip('<xsl:value-of select="$notesTooltip"/>', 150, event);</xsl:attribute>
- <span class="linkLabel">Notes</span></a>
- </li>
- </xsl:template>
-
- <xsl:template name="notesMenu">
- <ul id="notesMenu" class="popUpMenu">
- <li><a><xsl:attribute name="href">annotate:takeNote?articleId=<xsl:value-of select="$articleId"/></xsl:attribute><span class="menuItemText">Take a Note</span></a></li>
- <li id="showNotesItem" class="enabledMenuItem"><a onclick="swapMenuItem('showNotesItem', 'hideNotesItem');"><xsl:attribute name="href">annotate:showNotes?articleId=<xsl:value-of select="$articleId"/></xsl:attribute><span class="menuItemText">Show Notes</span></a></li>
- <li id="hideNotesItem" class="disabledMenuItem"><a onclick="swapMenuItem('hideNotesItem', 'showNotesItem');"><xsl:attribute name="href">annotate:hideNotes?articleId=<xsl:value-of select="$articleId"/></xsl:attribute><span class="menuItemText">Hide Notes</span></a></li>
- </ul>
- </xsl:template>
-
- <xsl:template name="sideBarControls">
- <div id="sideBarControlsContainer">
- <ul>
- <xsl:if test="$hasToc = 'true'">
- <li id="articleTocButton"><a onmouseout="hideTip();">
- <xsl:attribute name="href">javascript:loadToc('<xsl:value-of select="$articleTocURL"/>?articleId=<xsl:value-of select="$articleId"/>');</xsl:attribute>
- <xsl:attribute name="onmouseover">showTip('<xsl:value-of select="$TOCTooltip" />', 150, event);</xsl:attribute>
- <img src="img/bcd07_all_art_toc_icon.png" width="15" height="17"/><span class="linkLabel">View Table of Contents</span></a></li>
- </xsl:if>
- <li id="articleNotesButton"><a onmouseout="hideTip();">
- <xsl:attribute name="href">annotate:viewNotes?articleId=<xsl:value-of select="$articleId"/></xsl:attribute>
- <xsl:attribute name="onmouseover">showTip('<xsl:value-of select="$notesViewerTooltip" />', 150, event);</xsl:attribute>
- <xsl:attribute name="onclick">showNotes();</xsl:attribute><img src="img/bcd07_all_art_nv_icon.png" width="15" height="17"/><span class="linkLabel">Notes Viewer</span></a></li>
- </ul>
- </div>
- </xsl:template>
-
- <xsl:template name="contentUpdate">
- <xsl:param name="articleId"/>
- <div id="contentUpdate">
- <a href="articleupdate://?articleId={$articleId}"></a>
- </div>
- </xsl:template>
-
- <!-- the version of this template that would otherwise be inherited from shared/Variables.xsl
- refers to an absolute path (/bcom/gifs); we need a relative path for webrenderer -->
- <xsl:template match="charimg">
- <xsl:variable name="gif">
- <xsl:value-of select="@src"/>
- </xsl:variable>
-
- <xsl:variable name="fn">
- <xsl:value-of select="concat('./bcom/gifs/',$gif)"/>
- </xsl:variable>
-
- <img>
- <xsl:attribute name="src">
- <xsl:value-of select="$fn"/>
- </xsl:attribute>
- </img>
- </xsl:template>
-
- </xsl:stylesheet>
-