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"
- version="1.0">
-
- <xsl:param name="emailable">false</xsl:param>
- <xsl:param name="printable">false</xsl:param>
-
- <!-- Start idxref -->
- <xsl:template match="idxref[$printable = 'false']">
- <xsl:choose>
- <xsl:when test="ancestor::title">
- <xsl:apply-templates/>
- </xsl:when>
-
- <xsl:when test="xref[@tocid]">
- <!-- site has idxref then xref
- no need to create idxref link since a link will be created by xref template later.
- e.g. is Joseph Patrick Kennedy link of early life of John Kennedy article. -->
- <xsl:apply-templates/>
- </xsl:when>
-
- <xsl:when test="ancestor::xref">
- <!-- bcddev has xref then idxref
- no need to create idxref link since a link will be created by xref template later.
- e.g. is Joseph Patrick Kennedy link of early life of John Kennedy article. -->
- <xsl:apply-templates/>
- </xsl:when>
-
- <xsl:otherwise>
- <a>
- <xsl:attribute name="href"><xsl:value-of select="$articleURL"/>?idxref=<xsl:value-of select="@ref"/></xsl:attribute>
- <xsl:attribute name="name"><xsl:value-of select="@ref"/>.hook</xsl:attribute>
- <xsl:apply-templates/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- matches to EUs, for some xrefs -->
- <xsl:template match="xref[@ty='1' and $printable = 'false']">
- <xsl:param name="text"></xsl:param>
- <xsl:choose>
- <xsl:when test="ancestor::title">
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:when test="ancestor::imgmap">
- <a>
- <xsl:attribute name="href"><xsl:value-of select="$articleURL"/>?tocId=<xsl:value-of select="@tocid"/></xsl:attribute>
- <xsl:value-of select="$text"/><xsl:apply-templates/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a>
- <xsl:attribute name="href"><xsl:value-of select="$articleURL"/>?tocId=<xsl:value-of select="@tocid"/></xsl:attribute>
- <xsl:value-of select="$text"/><xsl:apply-templates/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- matches to ref points -->
- <xsl:template match="xref[@ty='2' and $printable = 'false']">
- <xsl:param name="text"></xsl:param>
- <xsl:choose>
- <xsl:when test="ancestor::title">
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:otherwise>
- <a>
- <xsl:attribute name="href"><xsl:value-of select="$articleURL"/>?tocId=<xsl:value-of select="@tocid"/>#<xsl:value-of select="@refid"/>.ref</xsl:attribute>
- <xsl:value-of select="$text"/><xsl:apply-templates/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- matches to toc levels -->
- <xsl:template match="xref[@ty='3' and $printable = 'false']">
- <xsl:param name="text"></xsl:param>
- <xsl:choose>
- <xsl:when test="ancestor::title">
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:otherwise>
- <a>
- <xsl:attribute name="href"><xsl:value-of select="$articleURL"/>?tocId=<xsl:value-of select="@tocid"/>&tocid=<xsl:value-of select="@tocid"/>#<xsl:value-of select="@tocid"/>.toc</xsl:attribute>
- <xsl:value-of select="$text"/><xsl:apply-templates/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- </xsl:stylesheet>
-
-