Doc: Shifting down HTML heading tags by one.
[shapes.git] / doc / parts / index / formats / html.xsl
blob96b23ce8977378822e11ea732e2e51ec8a8d5348
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 version="2.0"
21 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
22 <xsl:output method="xml" indent="no" />
24 <xsl:include href="../../formats/html.xsl" />
25 <xsl:include href="../../syntax/formats/syntax-html.xsl" />
27 <xsl:template match="/book">
28 <html>
29 <head>
30 <title><xsl:apply-templates select="title" /></title>
31 <xsl:element name="link">
32 <xsl:attribute name="rel">stylesheet</xsl:attribute>
33 <xsl:attribute name="href"><xsl:value-of select="/book/base/@href" />shapes.css</xsl:attribute>
34 </xsl:element>
35 </head>
36 <body>
37 <h1><xsl:apply-templates select="title" /></h1>
38 <hr class="thick"/>
39 <xsl:apply-templates select="top" />
40 <xsl:for-each select="section">
41 <h2><xsl:apply-templates select="title" /></h2>
42 <xsl:apply-templates select="top" />
43 <xsl:apply-templates select="body" />
44 <xsl:for-each select="section">
45 <h3><xsl:apply-templates select="title" /></h3>
46 <xsl:apply-templates select="top" />
47 <xsl:apply-templates select="body" />
48 <xsl:for-each select="section">
49 <h4><xsl:apply-templates select="title" /></h4>
50 <xsl:apply-templates select="top" />
51 <xsl:apply-templates select="body" />
52 </xsl:for-each>
53 </xsl:for-each>
54 </xsl:for-each>
55 </body>
56 </html><xsl:text>
57 </xsl:text>
58 </xsl:template>
60 <xsl:template match="index-of-books">
61 <ul>
62 <xsl:apply-templates select="/book/external/book | /book/external/man | /book/external/group" />
63 </ul>
64 </xsl:template>
66 <xsl:template match="external//book">
67 <li>
68 <xsl:element name="a">
69 <xsl:attribute name="href"><xsl:value-of select="/book/base/@href" /><xsl:apply-templates select="meta-selflink" /></xsl:attribute>
70 <b><xsl:apply-templates select="title" /></b>
71 </xsl:element>:
72 <xsl:apply-templates select="description" />
73 </li>
74 </xsl:template>
76 <xsl:template match="external//man">
77 <li>
78 <xsl:element name="a">
79 <xsl:attribute name="href"><xsl:value-of select="/book/base/@href" /><xsl:apply-templates select="manhead/meta-selflink" /></xsl:attribute>
80 <b><xsl:apply-templates select="manhead/center-header" /></b>
81 </xsl:element>:
82 <xsl:apply-templates select="manhead/description" />
83 </li>
84 </xsl:template>
86 <xsl:template match="external//group">
87 <li>
88 <b><xsl:apply-templates select="title" /></b>
89 <xsl:apply-templates select="description" />
90 <ul>
91 <xsl:apply-templates select="book | man | group" />
92 </ul>
93 </li>
94 </xsl:template>
97 </xsl:stylesheet>