sitemap.xsl revision b9b166bce28378f88ecba40c17f788f510b8357a
<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<!-- document() works relative to the xsl (!) file -->
<xsl:variable name="basedir" select="'../../'"/>
<!-- -->
<!-- <sitemap> -->
<!-- Process an entire document into an HTML page -->
<!-- -->
<xsl:template match="/sitemap">
<html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
<xsl:call-template name="head"/>
<body id="manual-page">
<xsl:call-template name="top"/>
<div id="page-content">
<div id="preamble">
<h1>
<xsl:value-of select="title"/>
</h1>
<xsl:apply-templates select="summary"/>
</div> <!-- /preamble -->
<xsl:if test="count(category) > 1 or seealso">
<div id="quickview">
<xsl:if test="count(category) > 1">
<!-- category index -->
<ul id="toc">
<xsl:for-each select="category">
<xsl:if test="@id">
<li>
<xsl:text> </xsl:text>
<a href="#{@id}">
<xsl:apply-templates select="title" mode="print"/>
</a>
</li>
</xsl:if>
<xsl:if test="not(@id)">
<li>
<xsl:text> </xsl:text>
<xsl:apply-templates select="title" mode="print"/>
</li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="seealso">
<h3>
</h3>
<ul class="seealso">
<xsl:for-each select="seealso">
<li>
<xsl:apply-templates/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</div> <!-- /quickview -->
</xsl:if>
<xsl:apply-templates select="category"/>
</div> <!-- /page-content -->
<xsl:call-template name="bottom"/>
</body>
</html>
</xsl:template>
<!-- -->
<!-- -->
<li>
<xsl:if test="@separate='yes'">
<xsl:attribute name="class">separate</xsl:attribute>
</xsl:if>
<xsl:if test="@href">
<a href="{@href}">
<xsl:value-of select="."/>
</a>
</xsl:if>
<xsl:if test="not(@href)">
<xsl:value-of select="."/>
</xsl:if>
</li>
<xsl:text>
</xsl:text> <!-- insert line break -->
</xsl:template>
<!-- -->
<!-- Process a sitemap category -->
<!-- -->
<xsl:template match="category">
<xsl:call-template name="toplink"/>
<div class="section">
<!-- Section heading -->
<h2>
<xsl:if test="@id">
<a id="{@id}" name="{@id}">
<xsl:apply-templates select="title" mode="print"/>
</a>
</xsl:if>
<xsl:if test="not(@id)">
<xsl:apply-templates select="title" mode="print"/>
</xsl:if>
</h2>
<!-- category body -->
<ul>
<xsl:apply-templates select="page"/>
</ul>
<xsl:apply-templates select="modulefilelist"/>
</div> <!-- /.section -->
</xsl:template>
<!-- /category -->
<!-- -->
<!-- category/modulefilelist -->
<!-- insert module list into sitemap -->
<!-- -->
<ul>
<xsl:for-each select="modulefile">
<xsl:variable name="current" select="document(concat($basedir,'mod/',.))/modulesynopsis" />
<xsl:variable name="name"><xsl:choose>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose></xsl:variable>
<li>
<xsl:when test="$name='core'">
</xsl:when>
<xsl:when test="$name='common'">
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
<xsl:value-of select="$name"/>
</xsl:otherwise></xsl:choose>
</a>
</li>
<xsl:text>
</xsl:text> <!-- insert line break -->
</xsl:if>
</xsl:for-each>
<!-- /core,mpm -->
<xsl:for-each select="modulefile">
<xsl:variable name="current" select="document(concat($basedir,'mod/',.))/modulesynopsis" />
<li>
<xsl:text> </xsl:text>
</a>
</li>
<xsl:text>
</xsl:text> <!-- insert line break -->
</xsl:if>
</xsl:for-each>
<!-- /other modules -->
</ul>
<!-- obsolete modules -->
<!--
<ul>
<xsl:for-each select="modulefile">
<xsl:sort select="document(concat($basedir,'mod/',.))/modulesynopsis/name"/>
<xsl:variable name="current" select="document(concat($basedir,'mod/',.))/modulesynopsis" />
<li>
<xsl:text> </xsl:text>
</a>
</li>
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:for-each>
</ul>
-->
<!-- /obsolete modules -->
</xsl:template>
<!-- /category/modulefilelist -->
</xsl:stylesheet>