moduleindex.xsl revision 4489f0b54d190e8ac29906e1071bbad6c49de17e
3726777f47ac4bba3e21b075905959bbea47e72eerikabele<?xml version="1.0"?>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele<xsl:stylesheet version="1.0"
3726777f47ac4bba3e21b075905959bbea47e72eerikabele xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3726777f47ac4bba3e21b075905959bbea47e72eerikabele xmlns="http://www.w3.org/1999/xhtml">
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <!-- -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <!-- Builds the moduleindex page -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <!-- -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:template match="moduleindex">
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:call-template name="head"/>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd<xsl:text>
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd</xsl:text> <!-- insert line break -->
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <body id="module-index">
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:call-template name="top"/>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
4489f0b54d190e8ac29906e1071bbad6c49de17end <div id="page-content">
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <div id="preamble">
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <h1>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:value-of select="title"/>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </h1>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd<xsl:text>
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd</xsl:text> <!-- insert line break -->
d3cd98e7839dd1c737c18d42a916ed20860a50e1nd
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:apply-templates select="summary" />
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </div>
4489f0b54d190e8ac29906e1071bbad6c49de17end <!-- /preamble -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end<xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end</xsl:text> <!-- insert line break -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end <div id="quickview">
4489f0b54d190e8ac29906e1071bbad6c49de17end <ul id="toc">
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end<xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end</xsl:text> <!-- insert line break -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end <li>
4489f0b54d190e8ac29906e1071bbad6c49de17end <img src="{$path}/images/down.gif" alt="" />
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:text> </xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end <a href="#core">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:value-of select="$messages/message[@name='corefeatures']"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </a>
4489f0b54d190e8ac29906e1071bbad6c49de17end </li>
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end <li>
4489f0b54d190e8ac29906e1071bbad6c49de17end <img src="{$path}/images/down.gif" alt="" />
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:text> </xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end <a href="#other">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:value-of select="$messages/message[@name='othermodules']"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </a>
4489f0b54d190e8ac29906e1071bbad6c49de17end </li>
4489f0b54d190e8ac29906e1071bbad6c49de17end </ul>
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:if test="seealso">
4489f0b54d190e8ac29906e1071bbad6c49de17end <h3>
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:value-of select="$messages/message[@name='seealso']"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </h3>
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end<xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end</xsl:text> <!-- insert line break -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end <ul class="seealso">
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end<xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end</xsl:text> <!-- insert line break -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:for-each select="seealso">
4489f0b54d190e8ac29906e1071bbad6c49de17end <li>
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:apply-templates/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </li>
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end<xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end</xsl:text> <!-- insert line break -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end </xsl:for-each>
4489f0b54d190e8ac29906e1071bbad6c49de17end </ul>
4489f0b54d190e8ac29906e1071bbad6c49de17end </xsl:if>
4489f0b54d190e8ac29906e1071bbad6c49de17end </div> <!-- /quickview -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert line break -->
3c56725151a46fef84ce376d709b5339da28e10fnd
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:call-template name="toplink"/>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
e0471b26427a7310358a7a3a835bd146072e4c29nd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert line break -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <div class="section">
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <h2>
3c56725151a46fef84ce376d709b5339da28e10fnd <a name="core" id="core">
3c56725151a46fef84ce376d709b5339da28e10fnd <xsl:value-of select="$messages/message[@name='corefeatures']"/>
3c56725151a46fef84ce376d709b5339da28e10fnd </a>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </h2>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
e0471b26427a7310358a7a3a835bd146072e4c29nd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert line break -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
4489f0b54d190e8ac29906e1071bbad6c49de17end <!-- -->
4489f0b54d190e8ac29906e1071bbad6c49de17end <!-- put core and mpm_common on top -->
4489f0b54d190e8ac29906e1071bbad6c49de17end <!-- -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <dl>
3c56725151a46fef84ce376d709b5339da28e10fnd
3c56725151a46fef84ce376d709b5339da28e10fnd<xsl:text>
3c56725151a46fef84ce376d709b5339da28e10fnd</xsl:text> <!-- insert line break -->
3c56725151a46fef84ce376d709b5339da28e10fnd
4489f0b54d190e8ac29906e1071bbad6c49de17end <dt>
4489f0b54d190e8ac29906e1071bbad6c49de17end <a href="{document(sitemap/category[@id='modules']/modulefilelist/modulefile[starts-with(.,'core.xml')])/modulesynopsis/name}.html">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:value-of select="document(sitemap/category[@id='modules']/modulefilelist/modulefile[starts-with(.,'core.xml')])/modulesynopsis/name"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </a>
4489f0b54d190e8ac29906e1071bbad6c49de17end </dt>
4489f0b54d190e8ac29906e1071bbad6c49de17end <dd>
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:apply-templates select="document(sitemap/category[@id='modules']/modulefilelist/modulefile[starts-with(.,'core.xml')])/modulesynopsis/description"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </dd>
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end<xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end</xsl:text> <!-- insert line break -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end <dt>
4489f0b54d190e8ac29906e1071bbad6c49de17end <a href="{document(sitemap/category[@id='modules']/modulefilelist/modulefile[starts-with(.,'mpm_common.xml')])/modulesynopsis/name}.html">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:value-of select="document(sitemap/category[@id='modules']/modulefilelist/modulefile[starts-with(.,'mpm_common.xml')])/modulesynopsis/name"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </a>
4489f0b54d190e8ac29906e1071bbad6c49de17end </dt>
4489f0b54d190e8ac29906e1071bbad6c49de17end <dd class="separate">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:apply-templates select="document(sitemap/category[@id='modules']/modulefilelist/modulefile[starts-with(.,'mpm_common.xml')])/modulesynopsis/description"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </dd>
4489f0b54d190e8ac29906e1071bbad6c49de17end <!-- /core, mpm_common -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end<xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end</xsl:text> <!-- insert line break -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:variable name="modules" select="document(sitemap/category[@id='modules']/modulefilelist/modulefile)/modulesynopsis[status='MPM' and name != 'mpm_common']"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:variable name="translist">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:call-template name="module-translist">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:with-param name="modules" select="$modules"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </xsl:call-template>
4489f0b54d190e8ac29906e1071bbad6c49de17end </xsl:variable>
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:for-each select="$modules">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:sort select="substring-before(substring-after($translist, concat('- ', translate(normalize-space(name),$lowercase,$uppercase), ' ')), ' -')"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <dt>
e0471b26427a7310358a7a3a835bd146072e4c29nd <a href="{name}.html">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:value-of select="name"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </a>
e0471b26427a7310358a7a3a835bd146072e4c29nd </dt>
e0471b26427a7310358a7a3a835bd146072e4c29nd <dd>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:apply-templates select="description"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </dd>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert line break -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </xsl:for-each>
4489f0b54d190e8ac29906e1071bbad6c49de17end <!-- /mpm -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </dl>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </div>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <!-- /core section -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
e0471b26427a7310358a7a3a835bd146072e4c29nd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert line break -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:call-template name="toplink"/>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
e0471b26427a7310358a7a3a835bd146072e4c29nd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert line break -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <div class="section">
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <h2>
3c56725151a46fef84ce376d709b5339da28e10fnd <a name="other" id="other">
3c56725151a46fef84ce376d709b5339da28e10fnd <xsl:value-of select="$messages/message[@name='othermodules']"/>
3c56725151a46fef84ce376d709b5339da28e10fnd </a>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </h2>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
3c56725151a46fef84ce376d709b5339da28e10fnd<xsl:text>
3c56725151a46fef84ce376d709b5339da28e10fnd</xsl:text> <!-- insert line break -->
3c56725151a46fef84ce376d709b5339da28e10fnd
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:variable name="modules" select="document(sitemap/category[@id='modules']/modulefilelist/modulefile)/modulesynopsis[status!='MPM' and status!='Core' and status!='Obsolete']"/>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- collect the start letters -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:variable name="start-letters">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:call-template name="module-startletters">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="modules" select="$modules"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:call-template>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:variable>
3c56725151a46fef84ce376d709b5339da28e10fnd
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- letter line -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <p class="letters">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:call-template name="letter-bar">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="letters" select="$start-letters"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="first" select="true()"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:call-template>
e0471b26427a7310358a7a3a835bd146072e4c29nd </p>
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- /letter line -->
3c56725151a46fef84ce376d709b5339da28e10fnd
3c56725151a46fef84ce376d709b5339da28e10fnd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert line break -->
3c56725151a46fef84ce376d709b5339da28e10fnd
e0471b26427a7310358a7a3a835bd146072e4c29nd <dl>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:call-template name="mindex-of-letter">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="letters-todo" select="$start-letters"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="modules" select="$modules"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:call-template>
3c56725151a46fef84ce376d709b5339da28e10fnd </dl>
3c56725151a46fef84ce376d709b5339da28e10fnd </div>
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- /modules section -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
4489f0b54d190e8ac29906e1071bbad6c49de17end </div>
4489f0b54d190e8ac29906e1071bbad6c49de17end <!-- /page-content -->
3c56725151a46fef84ce376d709b5339da28e10fnd
e0471b26427a7310358a7a3a835bd146072e4c29nd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert line break -->
3c56725151a46fef84ce376d709b5339da28e10fnd
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <xsl:call-template name="bottom"/>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
e0471b26427a7310358a7a3a835bd146072e4c29nd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert line break -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </body>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </html>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele </xsl:template>
3726777f47ac4bba3e21b075905959bbea47e72eerikabele <!-- /moduleindex -->
3726777f47ac4bba3e21b075905959bbea47e72eerikabele
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- the working horse. builds list items of all -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- modules starting with one letter -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- when done, it calls itself to catch the next letter -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:template name="mindex-of-letter">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:param name="letters-todo"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:param name="modules"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:variable name="letter" select="substring($letters-todo,1,1)"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:variable name="translist">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:call-template name="module-translist">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="modules" select="$modules"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:call-template>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:variable>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:for-each select="$modules[$letter=substring(substring-before(substring-after($translist, concat('- ', translate(normalize-space(name),$lowercase,$uppercase), ' ')), ' -'), 1, 1)]">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:sort select="substring-before(substring-after($translist, concat('- ', translate(normalize-space(name),$lowercase,$uppercase), ' ')), ' -')"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <dt>
e0471b26427a7310358a7a3a835bd146072e4c29nd <a href="{name}.html">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:if test="position()=1">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:attribute name="id"><xsl:value-of select="$letter"/></xsl:attribute>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:attribute name="name"><xsl:value-of select="$letter"/></xsl:attribute>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:if>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:value-of select="name"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </a>
e0471b26427a7310358a7a3a835bd146072e4c29nd </dt>
e0471b26427a7310358a7a3a835bd146072e4c29nd <dd>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:apply-templates select="description"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </dd>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd<xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd</xsl:text> <!-- insert a line break -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:for-each> <!-- /directives -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- call next letter, if there is -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:if test="string-length($letters-todo) &gt; 1">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:call-template name="mindex-of-letter">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="letters-todo" select="substring($letters-todo,2)"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="modules" select="$modules"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:call-template>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:if>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:template>
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- /mindex-of-letter -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- collect start letters of modules -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:template name="module-startletters">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:param name="modules"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:variable name="translist">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:call-template name="module-translist">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="modules" select="$modules"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:call-template>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:variable>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:call-template name="_squeeze-letters">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="lastletter" select="''"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:with-param name="letters">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:for-each select="$modules">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:sort select="substring-before(substring-after($translist, concat('- ', translate(normalize-space(name),$lowercase,$uppercase), ' ')), ' -')"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:value-of select="substring(substring-before(substring-after($translist, concat('- ', translate(normalize-space(name),$lowercase,$uppercase), ' ')), ' -'), 1, 1)"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:for-each>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:with-param>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:call-template>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:template>
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- /module-startletters -->
4489f0b54d190e8ac29906e1071bbad6c49de17end
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- define module name translations for sorting -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- it's a kind of a hack... -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- we build a string that contains the following data: -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- "- modulename sortname - modulename sortname - ..." -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- (with all data in uppercase) -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- So, the translation from modulename to sortname -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- can be done with the expression below: -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!--
e0471b26427a7310358a7a3a835bd146072e4c29nd substring-before(
e0471b26427a7310358a7a3a835bd146072e4c29nd substring-after($translist,
e0471b26427a7310358a7a3a835bd146072e4c29nd concat('- ',
e0471b26427a7310358a7a3a835bd146072e4c29nd translate(modulename,
e0471b26427a7310358a7a3a835bd146072e4c29nd $lowercase,
e0471b26427a7310358a7a3a835bd146072e4c29nd $uppercase),
e0471b26427a7310358a7a3a835bd146072e4c29nd ' ')
e0471b26427a7310358a7a3a835bd146072e4c29nd ),
e0471b26427a7310358a7a3a835bd146072e4c29nd ' -')
e0471b26427a7310358a7a3a835bd146072e4c29nd -->
e0471b26427a7310358a7a3a835bd146072e4c29nd <!-- -->
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:template name="module-translist">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:param name="modules"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:text>-</xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:for-each select="$modules">
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:variable name="sname" select="translate(normalize-space(name),$lowercase,$uppercase)"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:text> </xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:value-of select="$sname"/>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:text> </xsl:text>
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:call-template name="module-translatename">
4489f0b54d190e8ac29906e1071bbad6c49de17end <xsl:with-param name="name" select="$sname"/>
4489f0b54d190e8ac29906e1071bbad6c49de17end </xsl:call-template>
e0471b26427a7310358a7a3a835bd146072e4c29nd <xsl:text> -</xsl:text>
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:for-each>
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:template>
4489f0b54d190e8ac29906e1071bbad6c49de17end <!-- /module-translist -->
e0471b26427a7310358a7a3a835bd146072e4c29nd
e0471b26427a7310358a7a3a835bd146072e4c29nd </xsl:stylesheet>