1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7 - Copyright (C) 2006, 2007 John Costigan.
9 - This file is part of Maemo Mapper.
11 - Maemo Mapper is free software: you can redistribute it and/or modify
12 - it under the terms of the GNU General Public License as published by
13 - the Free Software Foundation, either version 3 of the License, or
14 - (at your option) any later version.
16 - Maemo Mapper is distributed in the hope that it will be useful,
17 - but WITHOUT ANY WARRANTY; without even the implied warranty of
18 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 - GNU General Public License for more details.
21 - You should have received a copy of the GNU General Public License
22 - along with Maemo Mapper. If not, see <http://www.gnu.org/licenses/>.
26 <xsl:output method="html"/>
29 <!-- Root element. -->
31 <xsl:template match="ossohelpsource">
33 <head><title><xsl:value-of select="folder/title"/></title></head>
35 <!-- Everything else -->
37 <xsl:apply-templates />
44 <!-- Sections (folder, topic) -->
46 <xsl:template match="folder">
48 <xsl:apply-templates select="title"/>
50 This page is an HTML version of the built-in documentation that is
51 available within Maemo Mapper via the "Help" main menu item.
54 <!-- Table of Contents -->
55 <h2 id="help_maemomapper_">Table of Contents</h2>
57 <xsl:for-each select="topic">
59 <xsl:element name="a">
60 <xsl:attribute name="href">
62 <xsl:when test="context/@contextUID">
63 #<xsl:value-of select="context/@contextUID"/>
66 #<xsl:value-of select="translate(topictitle, ' ', '_')"/>
67 <xsl:text>_topictitle</xsl:text>
71 <xsl:value-of select="topictitle"/>
74 <xsl:for-each select="heading">
76 <xsl:element name="a">
77 <xsl:attribute name="href">
78 #<xsl:value-of select="translate(../context/@contextUID, ' ', '_')"/>
79 <xsl:text>_</xsl:text>
80 <xsl:value-of select="translate(., ' ', '_')"/>
81 <xsl:text>_heading</xsl:text>
83 <xsl:value-of select="."/>
91 <xsl:apply-templates select="topic"/>
94 <xsl:template match="topic">
95 <xsl:element name="div">
96 <xsl:attribute name="id">
97 <xsl:value-of select="context/@contextUID"/>
99 <xsl:apply-templates />
104 <!-- Headings (title = h1, topictitle = h2, heading = h3) -->
106 <xsl:template match="title">
107 <h1><xsl:apply-templates /></h1>
110 <xsl:template match="topictitle">
111 <xsl:element name="h2">
112 <xsl:attribute name="id">
113 <xsl:value-of select="translate(., ' ', '_')"/>
114 <xsl:text>_topictitle</xsl:text>
116 <xsl:apply-templates />
120 <xsl:template match="heading">
121 <xsl:element name="h3">
122 <xsl:attribute name="id">
123 <xsl:value-of select="translate(../context/@contextUID, ' ', '_')"/>_<xsl:value-of select="translate(., ' ', '_')"/>
124 <xsl:text>_heading</xsl:text>
126 <xsl:apply-templates />
131 <!-- Simple HTML elements. -->
133 <xsl:template match="para">
134 <p><xsl:apply-templates /></p>
137 <xsl:template match="list">
138 <ul><xsl:apply-templates /></ul>
141 <xsl:template match="listitem">
142 <li><xsl:apply-templates /></li>
145 <xsl:template match="task_seq">
146 <ul><xsl:apply-templates /></ul>
149 <xsl:template match="step">
150 <li><xsl:apply-templates /></li>
153 <xsl:template match="display_text">
154 <code><xsl:apply-templates /></code>
157 <xsl:template match="tip">
158 <p><strong>Tip: <xsl:apply-templates /></strong></p>
161 <xsl:template match="note">
162 <p><strong>Note: <xsl:apply-templates /></strong></p>
165 <xsl:template match="important">
166 <p><strong>Important: <xsl:apply-templates /></strong></p>
169 <xsl:template match="example">
170 <p>Example: <xsl:apply-templates /></p>
173 <xsl:template match="Warning">
174 <p><strong>Warning: <xsl:apply-templates /></strong></p>
177 <xsl:template match="emphasis">
178 <em><xsl:apply-templates /></em>
181 <xsl:template match="@*|node()">
183 <xsl:apply-templates select="@*|node()"/>
190 <xsl:template match="graphic">
191 <xsl:element name="img">
192 <xsl:attribute name="src">
193 <xsl:text>http://maemo.org/forrest-images/4-x/maemo_4-0_tutorial/images/</xsl:text>
195 <xsl:when test="@filename = '2686KEY_full_screen'">
196 <xsl:text>hkey_fullscreen.png</xsl:text>
198 <xsl:when test="@filename = '2686KEY_zoom_in'">
199 <xsl:text>hkey_zoomIn.png</xsl:text>
201 <xsl:when test="@filename = '2686KEY_zoom_out'">
202 <xsl:text>hkey_zoomOut.png</xsl:text>
204 <xsl:when test="@filename = '2686KEY_scroll_up'">
205 <xsl:text>hkey_up.png</xsl:text>
207 <xsl:when test="@filename = '2686KEY_scroll_down'">
208 <xsl:text>hkey_down.png</xsl:text>
210 <xsl:when test="@filename = '2686KEY_scroll_left'">
211 <xsl:text>hkey_left.png</xsl:text>
213 <xsl:when test="@filename = '2686KEY_scroll_right'">
214 <xsl:text>hkey_right.png</xsl:text>
216 <xsl:when test="@filename = '2686KEY_scroll_center'">
217 <xsl:text>hkey_enter.png</xsl:text>
219 <xsl:when test="@filename = '2686KEY_esc'">
220 <xsl:text>hkey_cancel.png</xsl:text>
223 <xsl:text>???.png</xsl:text>
227 <xsl:attribute name="alt">
228 <xsl:value-of select="substring-after(@filename, '2686KEY_')"/>
230 <xsl:attribute name="style">
231 <xsl:text>height: 1.5em;</xsl:text>
237 <!-- Links and references. -->
239 <xsl:template match="ref">
240 <xsl:element name="a">
241 <xsl:attribute name="href">
242 #<xsl:value-of select="@refid"/>
244 <xsl:value-of select="@refdoc"/>