2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
4
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
5
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
8
- returns the filename associated to an ID in the original file
10
<xsl:template name="filename">
11
<xsl:param name="name" select="string(@href)"/>
13
<xsl:when test="$name = '#index'">
14
<xsl:text>index.html</xsl:text>
16
<xsl:when test="$name = '#testing'">
17
<xsl:text>testing.html</xsl:text>
19
<xsl:when test="$name = '#developing'">
20
<xsl:text>developing.html</xsl:text>
22
<xsl:when test="$name = '#helping'">
23
<xsl:text>helping.html</xsl:text>
25
<xsl:when test="$name = '#config'">
26
<xsl:text>config.html</xsl:text>
28
<xsl:when test="$name = '#ldap'">
29
<xsl:text>ldap.html</xsl:text>
31
<xsl:when test="$name = '#format'">
32
<xsl:text>format.html</xsl:text>
35
<xsl:value-of select="$name"/>
42
<xsl:variable name="globaltitle" select="string(/html/body/h1[1])"/>
46
<xsl:template name="download">
48
<h2 class="box_title">Download</h2>
49
<h4 class="box_header">RPMs</h4>
51
<li>RPMs for Fedora Core 4 are available from <a href="http://download.fedora.redhat.com/pub/fedora/linux/extras/">Fedora Extras</a></li>
53
<h4 class="box_header">Source</h4>
55
<li> <a href="http://ftp.gnome.org/pub/GNOME/sources/sabayon/">tarball</a></li>
56
<li> <a href="http://cvs.gnome.org/viewcvs/sabayon/">CVS Repository</a></li>
63
<xsl:template name="contribute">
65
<h2 class="box_title">Contribute</h2>
66
<p>There are several ways to contribute to the Sabayon project.</p>
67
<p><a href="testing.html">Testing</a>, go here if you want to install sabayon and try it out.</p>
68
<p><a href="developing.html">Developing</a>, get the code and try to fix errors and send patches to the maintainers.</p>
69
<p><a href="helping.html">Helping out</a> on the <a href="http://mail.gnome.org/mailman/listinfo/sabayon-list/">mailing list</a> and <a href="irc://irc.gnome.org/sabayon">IRC</a> for people having problems, letting them know where to go and what to do.</p>
76
<xsl:template name="contact">
78
<h2 class="box_title">Contact</h2>
79
<p>You can contact developers <a href="mailto:sabayon-list@gnome.org">sending a mail</a> to the <a href="http://mail.gnome.org/mailman/listinfo/sabayon-list/">Sabayon mailing list</a>. You do not need to be subscribed.</p>
80
<p>We are also often available to <a href="irc://irc.gnome.org/sabayon">chat on IRC</a>.</p>
81
<p><strong>Server:</strong> irc.gnome.org<br /><strong>Channel:</strong> #sabayon</p>
85
<xsl:template name="docs">
87
<h2 class="box_title">Documentation</h2>
88
<p>Format and deployement of the <a href="config.html">config
90
<p>Technical informations on the <a href="format.html">profile
96
- Write the styles in the head
98
<xsl:template name="style">
99
<link rel="stylesheet" type="text/css" href="sabayon.css" />
105
<xsl:template name="top">
107
<img src="title01.jpg" border="0" height="229" width="432" alt="Sabayon: user profiles made simple" /><img src="title02.jpg" border="0" height="229" alt="Small screenshot of sabayon" />
114
<xsl:template name="bottom">
115
<div id="copyright"> </div>
119
- Handling of nodes in the body after an H2
120
- Open a new file and dump all the siblings up to the next H2
122
<xsl:template name="subfile">
123
<xsl:param name="header" select="following-sibling::h2[1]"/>
124
<xsl:variable name="filename">
125
<xsl:call-template name="filename">
126
<xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
129
<xsl:variable name="title">
130
<xsl:value-of select="$header"/>
132
<xsl:document href="{$filename}" method="xml" encoding="ISO-8859-1"
133
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
134
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
137
<xsl:call-template name="style"/>
138
<xsl:element name="title">
139
<xsl:value-of select="$title"/>
144
<xsl:call-template name="top"/>
146
<xsl:call-template name="download"/>
147
<xsl:call-template name="contribute"/>
148
<xsl:call-template name="contact"/>
149
<xsl:call-template name="docs"/>
152
<xsl:apply-templates mode="subfile" select="$header/following-sibling::*[preceding-sibling::h2[1] = $header and name() != 'h2' ]"/>
154
<xsl:call-template name="bottom"/>
161
<xsl:template mode="subcontent" match="@*|node()">
163
<xsl:apply-templates mode="subcontent" select="@*|node()"/>
167
<xsl:template mode="content" match="@*|node()">
168
<xsl:if test="name() != 'h1' and name() != 'h2'">
170
<xsl:apply-templates mode="subcontent" select="@*|node()"/>
175
<xsl:template mode="subfile" match="@*|node()">
177
<xsl:apply-templates mode="content" select="@*|node()"/>
182
- Handling of the initial body and head HTML document
184
<xsl:template match="body">
185
<xsl:variable name="firsth2" select="./h2[1]"/>
188
<xsl:call-template name="top"/>
190
<xsl:call-template name="download"/>
191
<xsl:call-template name="contribute"/>
192
<xsl:call-template name="contact"/>
193
<xsl:call-template name="docs"/>
196
<xsl:apply-templates mode="content" select="($firsth2/preceding-sibling::*)"/>
197
<xsl:for-each select="./h2">
198
<xsl:call-template name="subfile">
199
<xsl:with-param name="header" select="."/>
203
<xsl:call-template name="bottom"/>
207
<xsl:template match="head">
209
<xsl:template match="html">
210
<xsl:message>Generating the Web pages</xsl:message>
213
<xsl:call-template name="style"/>
214
<title>User profiles made simple</title>
216
<xsl:apply-templates/>