Doc: Initiate transition to next generation documentation
[shapes.git] / doc / parts / extensions / formats / html.xsl
blobbc46ca55a3832433f105365aa2844315012e5359
1 <?xml version="1.0" encoding="UTF-8"?>
3 <!-- This file is part of Shapes. -->
4 <!-- -->
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. -->
9 <!-- -->
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. -->
14 <!-- -->
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/>. -->
17 <!-- -->
18 <!-- Copyright 2008 Henrik Tidefelt -->
20 <xsl:stylesheet
21 version="2.0"
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 <div class="p" style="text-align:center;"><b>Alphabetical index</b></div>
38 <xsl:if test="/book//system-binding">
39 <div class="p" style="text-align:center;">
40 <xsl:for-each select="/book//system-binding[@name]">
41 <xsl:sort select="@name" />
42 <xsl:call-template name="name-to-linked-value">
43 <xsl:with-param name="extension-href"><xsl:apply-templates select="/book/meta-selflink" /></xsl:with-param>
44 <xsl:with-param name="name"><xsl:value-of select="@name" /></xsl:with-param>
45 </xsl:call-template>
46   
47 </xsl:for-each>
48 </div>
49 </xsl:if>
50 <xsl:if test="/book//dynamic-variable">
51 <div class="p" style="text-align:center;">
52 <xsl:for-each select="/book//dynamic-variable[@name]">
53 <xsl:sort select="@name" />
54 <xsl:call-template name="name-to-linked-dynamic">
55 <xsl:with-param name="extension-href"><xsl:apply-templates select="/book/meta-selflink" /></xsl:with-param>
56 <xsl:with-param name="name"><xsl:value-of select="@name" /></xsl:with-param>
57 </xsl:call-template>
58   
59 </xsl:for-each>
60 </div>
61 </xsl:if>
62 <xsl:if test="/book/needs/a[@extension] | /book/within-namespace">
63 <hr class="thin"/>
64 </xsl:if>
65 <xsl:apply-templates select="/book/within-namespace" />
66 <xsl:if test="/book/needs/a[@extension]">
67 <div class="p">
68 <b>Dependencies:</b>
69 <xsl:for-each select="/book/needs/a[@extension]">
70 <xsl:text>  </xsl:text>
71 <xsl:apply-templates select="."/>
72 </xsl:for-each>
73 </div>
74 </xsl:if>
75 <hr class="thin"/>
76 </xsl:template>
78 <xsl:template match="index-of-books">
79 <ul>
80 <xsl:apply-templates select="/book/external/book" />
81 </ul>
82 </xsl:template>
84 <xsl:template match="external/book">
85 <li>
86 <xsl:element name="a">
87 <xsl:attribute name="href"><xsl:apply-templates select="meta-selflink" /></xsl:attribute>
88 <b><xsl:apply-templates select="title" /></b>
89 </xsl:element>
90 <xsl:if test="prelude">
91 <xsl:text> (in standard prelude)</xsl:text>
92 </xsl:if>:
93 <xsl:apply-templates select="description" />
94 </li>
95 </xsl:template>
97 <xsl:template match="/book/within-namespace">
98 <div class="p">
99 <b>Namespace:</b><xsl:text>  </xsl:text>
100 <xsl:call-template name="name-to-linked-namespace">
101 <xsl:with-param name="name"><xsl:value-of select="." /></xsl:with-param>
102 </xsl:call-template>
103 </div>
104 </xsl:template>
106 </xsl:stylesheet>