~ubuntu-branches/ubuntu/lucid/sabayon/lucid

« back to all changes in this revision

Viewing changes to doc/site.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Scott Balneaves
  • Date: 2009-12-28 16:58:21 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20091228165821-38riqcxr41abmelj
Tags: 2.29.5~rc1-0ubuntu1
* New upstream release
  - Depend on Pessulus
  - Added manual
  - Fixed several crasher bugs
  - Added apply by group
  - Symlinks now saved in zipfile
* debian
  - Updated deps in control
  - removed sabayon.8, sabayon-apply.8, install.manpages (upstream man)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0"?>
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"/>
6
 
 
7
 
<!--
8
 
 - returns the filename associated to an ID in the original file
9
 
 -->
10
 
  <xsl:template name="filename">
11
 
    <xsl:param name="name" select="string(@href)"/>
12
 
    <xsl:choose>
13
 
      <xsl:when test="$name = '#index'">
14
 
        <xsl:text>index.html</xsl:text>
15
 
      </xsl:when>
16
 
      <xsl:when test="$name = '#testing'">
17
 
        <xsl:text>testing.html</xsl:text>
18
 
      </xsl:when>
19
 
      <xsl:when test="$name = '#developing'">
20
 
        <xsl:text>developing.html</xsl:text>
21
 
      </xsl:when>
22
 
      <xsl:when test="$name = '#helping'">
23
 
        <xsl:text>helping.html</xsl:text>
24
 
      </xsl:when>
25
 
      <xsl:when test="$name = '#config'">
26
 
        <xsl:text>config.html</xsl:text>
27
 
      </xsl:when>
28
 
      <xsl:when test="$name = '#ldap'">
29
 
        <xsl:text>ldap.html</xsl:text>
30
 
      </xsl:when>
31
 
      <xsl:when test="$name = '#format'">
32
 
        <xsl:text>format.html</xsl:text>
33
 
      </xsl:when>
34
 
      <xsl:otherwise>
35
 
        <xsl:value-of select="$name"/>
36
 
      </xsl:otherwise>
37
 
    </xsl:choose>
38
 
  </xsl:template>
39
 
<!--
40
 
 - The global title
41
 
 -->
42
 
  <xsl:variable name="globaltitle" select="string(/html/body/h1[1])"/>
43
 
<!--
44
 
 - The download box
45
 
 -->
46
 
  <xsl:template name="download">
47
 
    <div class="box">
48
 
      <h2 class="box_title">Download</h2>
49
 
      <h4 class="box_header">RPMs</h4>
50
 
      <ul>
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>
52
 
      </ul>
53
 
      <h4 class="box_header">Source</h4>
54
 
      <ul>
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>
57
 
      </ul>
58
 
    </div>
59
 
  </xsl:template>
60
 
<!--
61
 
  the contribute box
62
 
 -->
63
 
  <xsl:template name="contribute">
64
 
    <div class="box">
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>
70
 
    </div>
71
 
  </xsl:template>
72
 
 
73
 
<!--
74
 
  the contact box
75
 
 -->
76
 
  <xsl:template name="contact">
77
 
    <div class="box">
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>
82
 
    </div>
83
 
  </xsl:template>
84
 
 
85
 
  <xsl:template name="docs">
86
 
    <div class="box">
87
 
      <h2 class="box_title">Documentation</h2>
88
 
      <p>Format and deployement of the <a href="config.html">config
89
 
         files</a></p>
90
 
      <p>Technical informations on the <a href="format.html">profile
91
 
         format</a></p>
92
 
    </div>
93
 
  </xsl:template>
94
 
 
95
 
<!--
96
 
 - Write the styles in the head
97
 
 -->
98
 
  <xsl:template name="style">
99
 
    <link rel="stylesheet" type="text/css" href="sabayon.css" />
100
 
  </xsl:template>
101
 
 
102
 
<!--
103
 
 - The top section
104
 
 -->
105
 
  <xsl:template name="top">
106
 
    <div id="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" />
108
 
    </div>
109
 
  </xsl:template>
110
 
 
111
 
<!--
112
 
 - The bottom section
113
 
 -->
114
 
  <xsl:template name="bottom">
115
 
    <div id="copyright"> </div> 
116
 
  </xsl:template>
117
 
 
118
 
<!--
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
121
 
 -->
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))"/>
127
 
      </xsl:call-template>
128
 
    </xsl:variable>
129
 
    <xsl:variable name="title">
130
 
      <xsl:value-of select="$header"/>
131
 
    </xsl:variable>
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">
135
 
      <html>
136
 
        <head>
137
 
          <xsl:call-template name="style"/>
138
 
          <xsl:element name="title">
139
 
            <xsl:value-of select="$title"/>
140
 
          </xsl:element>
141
 
        </head>
142
 
        <body>
143
 
          <div id="main">
144
 
            <xsl:call-template name="top"/>
145
 
            <div id="left">
146
 
              <xsl:call-template name="download"/>
147
 
              <xsl:call-template name="contribute"/>
148
 
              <xsl:call-template name="contact"/>
149
 
              <xsl:call-template name="docs"/>
150
 
            </div>
151
 
            <div id="right">
152
 
              <xsl:apply-templates mode="subfile" select="$header/following-sibling::*[preceding-sibling::h2[1] = $header and name() != 'h2' ]"/>
153
 
            </div>
154
 
            <xsl:call-template name="bottom"/>
155
 
          </div>
156
 
        </body>
157
 
      </html>
158
 
    </xsl:document>
159
 
  </xsl:template>
160
 
 
161
 
  <xsl:template mode="subcontent" match="@*|node()">
162
 
    <xsl:copy>
163
 
      <xsl:apply-templates mode="subcontent" select="@*|node()"/>
164
 
    </xsl:copy>
165
 
  </xsl:template>
166
 
 
167
 
  <xsl:template mode="content" match="@*|node()">
168
 
    <xsl:if test="name() != 'h1' and name() != 'h2'">
169
 
      <xsl:copy>
170
 
        <xsl:apply-templates mode="subcontent" select="@*|node()"/>
171
 
      </xsl:copy>
172
 
    </xsl:if>
173
 
  </xsl:template>
174
 
 
175
 
  <xsl:template mode="subfile" match="@*|node()">
176
 
    <xsl:copy>
177
 
      <xsl:apply-templates mode="content" select="@*|node()"/>
178
 
    </xsl:copy>
179
 
  </xsl:template>
180
 
 
181
 
<!--
182
 
 - Handling of the initial body and head HTML document
183
 
 -->
184
 
  <xsl:template match="body">
185
 
    <xsl:variable name="firsth2" select="./h2[1]"/>
186
 
    <body>
187
 
      <div id="main">
188
 
        <xsl:call-template name="top"/>
189
 
        <div id="left">
190
 
          <xsl:call-template name="download"/>
191
 
          <xsl:call-template name="contribute"/>
192
 
          <xsl:call-template name="contact"/>
193
 
          <xsl:call-template name="docs"/>
194
 
        </div>
195
 
        <div id="right">
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="."/>
200
 
            </xsl:call-template>
201
 
          </xsl:for-each>
202
 
        </div>
203
 
        <xsl:call-template name="bottom"/>
204
 
      </div>
205
 
    </body>
206
 
  </xsl:template>
207
 
  <xsl:template match="head">
208
 
  </xsl:template>
209
 
  <xsl:template match="html">
210
 
    <xsl:message>Generating the Web pages</xsl:message>
211
 
    <html>
212
 
      <head>
213
 
        <xsl:call-template name="style"/>
214
 
        <title>User profiles made simple</title>
215
 
      </head>
216
 
      <xsl:apply-templates/>
217
 
    </html>
218
 
  </xsl:template>
219
 
</xsl:stylesheet>