directiveindex.xsl revision d3cd98e7839dd1c737c18d42a916ed20860a50e1
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <!-- <directiveindex> -->
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <!-- Builds the directive index page -->
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:variable name="directives" select="document(sitemap/category[@id='modules']/modulefilelist/modulefile)/modulesynopsis[status!='Obsolete']/directivesynopsis[not(@location)]"/>
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <!-- collect the start letters -->
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:call-template name="directive-startletters">
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:with-param name="directives" select="$directives"/>
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <!-- letter line -->
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:with-param name="letters" select="$start-letters"/>
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <!-- /letter line -->
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:with-param name="letters-todo" select="$start-letters"/>
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:with-param name="directives" select="$directives"/>
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <!-- the working horse. builds list items of all -->
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <!-- directives starting with one letter -->
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <!-- when done, it calls itself to catch the next letter -->
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:variable name="letter" select="substring($letters-todo,1,1)"/>
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:for-each select="$directives[$letter=translate(substring(normalize-space(name),1,1),$lowercase,$uppercase)]">
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <a href="{/name}.html#{translate(name,$uppercase,$lowercase)}">
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:attribute name="id"><xsl:value-of select="$letter"/></xsl:attribute>
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:attribute name="name"><xsl:value-of select="$letter"/></xsl:attribute>
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <!-- call next letter, if there is -->
9a3e40dc49c1e38bf58e45be5adff37615f3910bJan Cholasta <xsl:if test="string-length($letters-todo) > 1">