1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 <!-- This file is part of Shapes. -->
5 <!-- Shapes is free software: you can redistribute it and/or modify -->
6 <!-- it under the terms of the GNU General Public License as published by -->
7 <!-- the Free Software Foundation, either version 3 of the License, or -->
8 <!-- any later version. -->
10 <!-- Shapes is distributed in the hope that it will be useful, -->
11 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
12 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
13 <!-- GNU General Public License for more details. -->
15 <!-- You should have received a copy of the GNU General Public License -->
16 <!-- along with Shapes. If not, see <http://www.gnu.org/licenses/>. -->
18 <!-- Copyright 2008 Henrik Tidefelt -->
22 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
23 xmlns=
"http://www.w3.org/1999/xhtml"
25 <xsl:output method=
"xml" indent=
"no"
26 doctype-system=
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
27 doctype-public=
"-//W3C//DTD XHTML 1.0 Strict//EN"
30 <xsl:include href=
"../../formats/html.xsl" />
31 <xsl:include href=
"../../formats/bindings-html.xsl" />
32 <xsl:include href=
"../../formats/examplecode-html.xsl" />
33 <xsl:include href=
"../../formats/plain-book-html.xsl" />
34 <xsl:include href=
"../../formats/language-elements-html.xsl" />
36 <xsl:template match=
"alphabetical-index">
37 <xsl:variable name=
"ns"><xsl:value-of select=
"ancestor::book/namespace" /></xsl:variable>
38 <xsl:variable name=
"ext"><xsl:value-of select=
"ancestor::book/extension" /></xsl:variable>
39 <div class=
"p" style=
"text-align:center;"><b>Alphabetical index
</b></div>
40 <div class=
"p" style=
"text-align:center;">
41 <xsl:for-each select=
"/book/external/toc/bindings/binding[@namespace = $ns and @extension = $ext]">
42 <xsl:sort select=
"@name" />
43 <xsl:if test=
"position() != 1"><xsl:text> </xsl:text></xsl:if>
44 <span class=
"horizontal-item">
45 <xsl:apply-templates mode=
"placed-binding" select=
"." />
50 <xsl:apply-templates select=
"/book/namespace" />
51 <xsl:if test=
"/book/needs/a[@extension]">
54 <xsl:for-each select=
"/book/needs/a[@extension]">
55 <xsl:text> </xsl:text>
56 <xsl:apply-templates select=
"."/>
63 <xsl:template match=
"index-of-books">
65 <xsl:apply-templates select=
"/book/external/book" />
69 <xsl:template match=
"external/book">
71 <xsl:element name=
"a">
72 <xsl:attribute name=
"href"><xsl:apply-templates select=
"meta-selflink" /></xsl:attribute>
73 <b><xsl:apply-templates select=
"title" /></b>
75 <xsl:if test=
"prelude">
76 <xsl:text> (in standard prelude)
</xsl:text>
78 <xsl:apply-templates select=
"description" />
82 <xsl:template match=
"/book/namespace">
84 <b>Namespace:
</b><xsl:text> </xsl:text>
85 <xsl:call-template name=
"name-to-linked-namespace">
86 <xsl:with-param name=
"name"><xsl:value-of select=
"." /></xsl:with-param>