|  | Stylesheet |
<xsl:stylesheet version="2.0" exclude-result-prefixes="c">
<xsl:variable name="indexhref" select="document(/descendant::element()/@indexhref)"/>
<xsl:variable name="url-base">
<xsl:choose>
<xsl:when test="/descendant::element()/@indexhref">
<xsl:value-of select="$indexhref/c:index/@base"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/c:index/@base"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="url-acronyms">
<xsl:choose>
<xsl:when test="/descendant::element()/@indexhref">
<xsl:value-of select="$indexhref/c:index/@acronyms"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/c:index/@acronyms"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="url-authors">
<xsl:choose>
<xsl:when test="/descendant::element()/@indexhref">
<xsl:value-of select="$indexhref/c:index/@authors"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/c:index/@authors"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="url-keywords">
<xsl:choose>
<xsl:when test="/descendant::element()/@indexhref">
<xsl:value-of select="$indexhref/c:index/@keywords"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/c:index/@keywords"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="url-toc">
<xsl:choose>
<xsl:when test="/descendant::element()/@indexhref">
<xsl:value-of select="$indexhref/c:index/@toc"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/c:index/@toc"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="acronymlist" select="document(concat($url-base,$url-acronyms), $indexhref)"/>
<xsl:variable name="authorlist" select="document(concat($url-base,$url-authors), $indexhref)"/>
<xsl:variable name="keywordlist" select="document(concat($url-base,$url-keywords), $indexhref)"/>
<xsl:variable name="toclist" select="concat($url-base,$url-toc)"/>
</xsl:stylesheet> index2.xsl |