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 $
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"
40 doctype-public =
"-//W3C//DTD HTML 4.0 Transitional//EN"
41 omit-xml-declaration =
"yes"
44 <xsl:include href=
"../layout.xsl"/>
47 <!-- =============================
49 ================================== -->
52 <xsl:template match=
"/">
54 <xsl:call-template name=
"head"/>
55 <xsl:call-template name=
"body"/>
60 <!-- =============================
62 ================================== -->
64 <xsl:template name=
"body">
66 <xsl:call-template name=
"title"/>
67 <xsl:call-template name=
"toc"/>
72 <xsl:template name=
"toc">
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 ]">
88 <xsl:call-template name=
"document-group">
89 <xsl:with-param name=
"group" select=
"$group"/>
93 @ post group html here
99 <!-- use this alternative if you do not need to use groups
100 (uncomment to use - and do not forget to comment the group
104 <xsl:apply-templates select="/session/content/document"/>
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"/>
129 <xsl:template name=
"document-group">
130 <xsl:param name=
"group"/>
132 <!-- @ pre group code here -->
136 <xsl:variable name=
"count" select=
"(position() - 1) * $group + 1"/>
138 <xsl:for-each select=
"/session/content/document[$count <= position() and position() < ($count + $group)]">
140 <xsl:apply-templates select=
"."/>
144 <!-- @ post group code here -->
151 <xsl:template name=
"title">
153 @ Pre title html code here
156 <xsl:value-of select=
"/session/general-info/@title"/>
159 @ Post title html code here
163 <!-- =============================
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,'/')"/>
179 <xsl:value-of select=
"concat(@dir,'/')"/>
181 <xsl:value-of select=
"@fn"/>
185 <xsl:template match=
"document/@title">
186 <span class=
"doctitle">
188 <xsl:attribute name=
"href">
189 <xsl:apply-templates select=
".." mode=
"href"/>
192 <xsl:value-of select=
"."/>
199 <xsl:template match=
"document/@description">
200 <span class=
"docdescription">
201 <xsl:value-of select=
"."/>
207 <xsl:template match=
"document/@author">
208 <span class=
"docauthor">
209 <xsl:value-of select=
"."/>
215 <xsl:template match=
"document/@create-date">
216 <span class=
"doccreationdate">
217 <xsl:value-of select=
"."/>
223 <xsl:template match=
"document/@update-date">
224 <span class=
"doclastchangedate">
225 <xsl:value-of select=
"."/>
231 <xsl:template match=
"document/@filename">
232 <span class=
"docfilename">
233 <xsl:value-of select=
"."/>
239 <xsl:template match=
"document/@format">
240 <span class=
"docfileformatinfo">
241 <xsl:value-of select=
"."/>
247 <xsl:template match=
"document/@pages">
248 <span class=
"docnumberofpages">
249 <xsl:value-of select=
"."/>
255 <xsl:template match=
"document/@size">
256 <span class=
"docsizeinkb">
257 <xsl:value-of select=
"."/>
262 <xsl:template match=
"document/@icon">
263 <img src=
"images/{.}"/>
268 <!-- =============================
271 this section should not be changed
272 ================================== -->
274 <xsl:template name=
"head">
277 <xsl:value-of select=
"/session/general-info/@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}"/>
290 <link href=
"style.css" rel=
"stylesheet" type=
"text/css"/>