home *** CD-ROM | disk | FTP | other *** search
- <!DOCTYPE xsl:stylesheet [
- <!ENTITY nbsp "<xsl:text disable-output-escaping='yes'> </xsl:text>">
- ]>
-
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
- <xsl:output method="html" />
-
- <xsl:template match="firstparagraph">
- <!-- xsl:apply-templates select="title" / -->
- <xsl:apply-templates select="firstart" />
- <xsl:apply-templates select="body" />
- </xsl:template>
-
-
- <xsl:template match="title">
- <xsl:choose>
- <xsl:when
- test="starts-with(../articleinfo/@contenttype, 'boy')">
- <div class="copyboldlink">
- Year in Review
- <xsl:value-of
- select="substring(../articleinfo/@contenttype, 4, 4)" />
- :
- <xsl:value-of
- select="../articleinfo/@contentsubtype" />
- </div>
- <xsl:apply-templates />
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="titltxt">
- <xsl:apply-templates mode="text_mode" />
- </xsl:template>
-
- <xsl:template match="tabbrev|chemsym">
- (<xsl:apply-templates />)
- </xsl:template>
-
- <xsl:template match="firstart" />
-
- <xsl:template match="asset" />
- <xsl:template match="body">
- <xsl:variable name="parsedbody">
- <xsl:apply-templates mode="text_mode" />
- </xsl:variable>
-
- <div class="featcopy">
- <xsl:choose>
- <xsl:when test="string-length($parsedbody) > 400">
- <xsl:call-template name="getgist">
- <xsl:with-param name="gistbody"
- select="$parsedbody" />
- </xsl:call-template>
- ...
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$parsedbody"
- disable-output-escaping="no" />
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:template>
-
- <xsl:template name="getgist">
- <xsl:param name="charposition" select="400" />
- <xsl:param name="gistbody" />
- <xsl:choose>
- <xsl:when
- test="substring($gistbody,$charposition,1) = ' '">
- <xsl:value-of
- select="substring($gistbody,1,$charposition)"
- disable-output-escaping="no" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="getgist">
- <xsl:with-param name="charposition"
- select="$charposition - 1" />
- <xsl:with-param name="gistbody" select="$gistbody" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="charundef | charemph | charfont"
- mode="text_mode">
- <xsl:value-of select="@char" />
- <xsl:apply-templates mode="text_mode" />
- </xsl:template>
-
- <xsl:template match="*" mode="text_mode">
- <xsl:apply-templates mode="text_mode" />
- </xsl:template>
-
-
- </xsl:stylesheet>
-