merge the formfield patch from ooo-build
[ooovba.git] / extras / source / misc_config / wizard / web / layouts / layoutX.xsl
blob8be4f5d0563eaeb6cf844a48fdc8294356ebbaa9
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--*************************************************************************
4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 Copyright 2008 by Sun Microsystems, Inc.
8 OpenOffice.org - a multi-platform office productivity suite
10 $RCSfile: header.hxx,v $
12 $Revision: 1.1 $
14 This file is part of OpenOffice.org.
16 OpenOffice.org is free software: you can redistribute it and/or modify
17 it under the terms of the GNU Lesser General Public License version 3
18 only, as published by the Free Software Foundation.
20 OpenOffice.org is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU Lesser General Public License version 3 for more details
24 (a copy is included in the LICENSE file that accompanied this code).
26 You should have received a copy of the GNU Lesser General Public License
27 version 3 along with OpenOffice.org. If not, see
28 <http://www.openoffice.org/license.html>
29 for a copy of the LGPLv3 License.
31 ************************************************************************-->
33 <xsl:stylesheet version="1.0"
34 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
35 xmlns="http://www.w3.org/1999/xhtml">
37 <xsl:output method = "html"
38 media-type = "text/html"
39 indent = "yes"
40 doctype-public = "-//W3C//DTD HTML 4.0 Transitional//EN"
41 omit-xml-declaration = "yes"
42 standalone = "yes" />
44 <xsl:include href="../layout.xsl"/>
47 <!-- =============================
48 ROOT
49 ================================== -->
52 <xsl:template match="/">
53 <html>
54 <xsl:call-template name="head"/>
55 <xsl:call-template name="body"/>
56 </html>
57 </xsl:template>
60 <!-- =============================
61 HTML BODY
62 ================================== -->
64 <xsl:template name="body">
65 <body>
66 <xsl:call-template name="title"/>
67 <xsl:call-template name="toc"/>
68 </body>
69 </xsl:template>
72 <xsl:template name="toc">
73 <!--
74 @ pre toc html here
75 -->
77 <!-- use this to group documents, it
78 is for example usefull when generating tables -->
80 <xsl:variable name="group" select="3"/>
82 <xsl:for-each select="/session/content/document[ ( ( position() - 1 ) mod $group ) = 0 ]">
84 <!--
85 @ pre group html here
86 -->
88 <xsl:call-template name="document-group">
89 <xsl:with-param name="group" select="$group"/>
90 </xsl:call-template>
92 <!--
93 @ post group html here
94 -->
96 </xsl:for-each>
99 <!-- use this alternative if you do not need to use groups
100 (uncomment to use - and do not forget to comment the group
101 option above...)-->
103 <!--
104 <xsl:apply-templates select="/session/content/document"/>
107 <!--
108 @ post toc html here
111 </xsl:template>
113 <!-- also when using groups, in the end it comes
114 to this template, which is called for each document -->
115 <xsl:template match="document">
116 <xsl:apply-templates select="@title"/>
117 <xsl:apply-templates select="@description"/>
118 <xsl:apply-templates select="@author"/>
119 <xsl:apply-templates select="@create-date"/>
120 <xsl:apply-templates select="@update-date"/>
121 <xsl:apply-templates select="@filename"/>
122 <xsl:apply-templates select="@format"/>
123 <xsl:apply-templates select="@format-icon"/>
124 <xsl:apply-templates select="@format-icon"/>
125 </xsl:template>
129 <xsl:template name="document-group">
130 <xsl:param name="group"/>
132 <!-- @ pre group code here -->
134 <!-- - - -->
136 <xsl:variable name="count" select="(position() - 1) * $group + 1"/>
138 <xsl:for-each select="/session/content/document[$count &lt;= position() and position() &lt; ($count + $group)]">
140 <xsl:apply-templates select="."/>
142 </xsl:for-each>
144 <!-- @ post group code here -->
146 <!-- - - -->
148 </xsl:template>
151 <xsl:template name="title">
152 <!--
153 @ Pre title html code here
156 <xsl:value-of select="/session/general-info/@title"/>
158 <!--
159 @ Post title html code here
161 </xsl:template>
163 <!-- =============================
164 Document properties
166 This section contains templates which
167 give the document properties...
169 ================================== -->
171 <!-- this tempaltes gives the
172 relative href of the document. To use
173 with the <a href="..."> attribute-->
176 <xsl:template match="document" mode="href">
177 <xsl:value-of select="concat(../@directory,'/')"/>
178 <xsl:if test="@dir">
179 <xsl:value-of select="concat(@dir,'/')"/>
180 </xsl:if>
181 <xsl:value-of select="@fn"/>
182 </xsl:template>
185 <xsl:template match="document/@title">
186 <span class="doctitle">
188 <xsl:attribute name="href">
189 <xsl:apply-templates select=".." mode="href"/>
190 </xsl:attribute>
192 <xsl:value-of select="."/>
193 </a>
194 </span>
195 <br/>
196 </xsl:template>
199 <xsl:template match="document/@description">
200 <span class="docdescription">
201 <xsl:value-of select="."/>
202 </span>
203 <br/>
204 </xsl:template>
207 <xsl:template match="document/@author">
208 <span class="docauthor">
209 <xsl:value-of select="."/>
210 </span>
211 <br/>
212 </xsl:template>
215 <xsl:template match="document/@create-date">
216 <span class="doccreationdate">
217 <xsl:value-of select="."/>
218 </span>
219 <br/>
220 </xsl:template>
223 <xsl:template match="document/@update-date">
224 <span class="doclastchangedate">
225 <xsl:value-of select="."/>
226 </span>
227 <br/>
228 </xsl:template>
231 <xsl:template match="document/@filename">
232 <span class="docfilename">
233 <xsl:value-of select="."/>
234 </span>
235 <br/>
236 </xsl:template>
239 <xsl:template match="document/@format">
240 <span class="docfileformatinfo">
241 <xsl:value-of select="."/>
242 </span>
243 <br/>
244 </xsl:template>
247 <xsl:template match="document/@pages">
248 <span class="docnumberofpages">
249 <xsl:value-of select="."/>
250 </span>
251 <br/>
252 </xsl:template>
255 <xsl:template match="document/@size">
256 <span class="docsizeinkb">
257 <xsl:value-of select="."/>
258 </span>
259 <br/>
260 </xsl:template>
262 <xsl:template match="document/@icon">
263 <img src="images/{.}"/>
264 <br/>
265 </xsl:template>
268 <!-- =============================
269 HTML HEAD
271 this section should not be changed
272 ================================== -->
274 <xsl:template name="head">
275 <head>
276 <title>
277 <xsl:value-of select="/session/general-info/@title"/>
278 </title>
279 <!-- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -->
280 <meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8"/>
281 <meta name="description" content="{/session/general-info/@description}"/>
282 <meta name="keywords" content="{/session/general-info/@keywords}"/>
283 <meta name="author" content="{/session/general-info/@author}"/>
284 <meta name="email" content="{/session/general-info/@email}"/>
285 <meta name="copyright" content="{/session/general-info/@copyright}"/>
286 <!-- create date?
287 update date?
288 fav icon?
290 <link href="style.css" rel="stylesheet" type="text/css"/>
292 </head>
293 </xsl:template>
295 </xsl:stylesheet>