Doc: Initiate transition to next generation documentation
[shapes.git] / doc / parts / index / formats / html.xsl
blob2005e9c19b200497155de31701ec64614fc8c51b
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="../../syntax/formats/syntax-html.xsl" />
34 <xsl:template match="/book">
35 <html>
36 <head>
37 <title><xsl:apply-templates select="title" /></title>
38 <xsl:element name="link">
39 <xsl:attribute name="rel">stylesheet</xsl:attribute>
40 <xsl:attribute name="href"><xsl:value-of select="/book/base/@href" />shapes.css</xsl:attribute>
41 </xsl:element>
42 </head>
43 <body>
44 <xsl:call-template name="version-header" />
45 <h1><xsl:apply-templates select="title" /></h1>
46 <hr class="thick"/>
47 <xsl:apply-templates select="top" />
48 <xsl:for-each select="section">
49 <h2><xsl:apply-templates select="title" /></h2>
50 <xsl:apply-templates select="top" />
51 <xsl:apply-templates select="body" />
52 <xsl:for-each select="section">
53 <h3><xsl:apply-templates select="title" /></h3>
54 <xsl:apply-templates select="top" />
55 <xsl:apply-templates select="body" />
56 <xsl:for-each select="section">
57 <h4><xsl:apply-templates select="title" /></h4>
58 <xsl:apply-templates select="top" />
59 <xsl:apply-templates select="body" />
60 </xsl:for-each>
61 </xsl:for-each>
62 </xsl:for-each>
63 <xsl:call-template name="SF-placeholder" />
64 </body>
65 </html>
66 </xsl:template>
68 <xsl:template match="index-of-books">
69 <ul>
70 <xsl:apply-templates select="/book/external/book | /book/external/man | /book/external/group" />
71 </ul>
72 </xsl:template>
74 <xsl:template match="external//book">
75 <li>
76 <xsl:element name="a">
77 <xsl:attribute name="href"><xsl:value-of select="/book/base/@href" /><xsl:apply-templates select="meta-selflink" /></xsl:attribute>
78 <b><xsl:apply-templates select="title" /></b>
79 </xsl:element>:
80 <xsl:apply-templates select="description" />
81 </li>
82 </xsl:template>
84 <xsl:template match="external//man">
85 <li>
86 <xsl:element name="a">
87 <xsl:attribute name="href"><xsl:value-of select="/book/base/@href" /><xsl:apply-templates select="manhead/meta-selflink" /></xsl:attribute>
88 <b><xsl:apply-templates select="manhead/center-header" /></b>
89 </xsl:element>:
90 <xsl:apply-templates select="manhead/description" />
91 </li>
92 </xsl:template>
94 <xsl:template match="external//group">
95 <li>
96 <b><xsl:apply-templates select="title" /></b>
97 <xsl:apply-templates select="description" />
98 <ul>
99 <xsl:apply-templates select="book | man | group" />
100 </ul>
101 </li>
102 </xsl:template>
105 </xsl:stylesheet>