Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / extras / source / misc_config / wizard / web / layouts / table_2 / index.html.xsl
blob1cb498f649c3bb859263167e3cdb844fbb4ede4b
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 -->
19 <!-- =================================================
21 This template is a skeleton for single level TOC pages
22 Do not overwrite this ! copy it and complete the missing
23 code.
24 I use the @ character whereever there is a missing code, so
25 you can use a simple find to navigate and find the
26 places...
27 ====================================================== -->
29 <xsl:stylesheet version="1.0"
30 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
31 xmlns="http://www.w3.org/1999/xhtml">
33 <xsl:output method = "html"
34 media-type = "text/html"
35 indent = "yes"
36 doctype-public = "-//W3C//DTD HTML 4.0 Transitional//EN"
37 omit-xml-declaration = "yes"
38 standalone = "yes" />
40 <xsl:include href="../layout.xsl"/>
43 <!-- =============================
44 HTML BODY
45 ================================== -->
47 <xsl:template name="body">
49 <body>
51 <!--
52 @ pre code here
53 -->
55 <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tcolor">
57 <xsl:call-template name="title"/>
59 <!--
60 @ inter code here
61 -->
63 <xsl:call-template name="toc"/>
65 <!--
66 @ post code here
67 -->
69 </table>
71 </body>
73 </xsl:template>
78 <xsl:template name="title">
79 <!--
80 @ Pre title html code here
81 -->
82 <tr>
83 <td height="200%" colspan="7" class="toctitle">
85 <xsl:value-of select="/session/general-info/@title"/>
87 <!--
88 @ Post title html code here
89 -->
91 </td>
92 </tr>
94 </xsl:template>
97 <xsl:template name="toc">
99 <!-- @ pre toc html here -->
101 <!-- - - -->
103 <!-- use this to group documents, it
104 is for example usefull when generating tables -->
108 <xsl:call-template name="toc-with-group">
109 <xsl:with-param name="group" select="2"/>
110 </xsl:call-template>
113 <!-- use this alternative if you do not need to use groups
114 (uncomment to use - and do not forget to comment the group
115 option above...)-->
117 <!-- <xsl:apply-templates select="/session/content/document"/> -->
119 <!-- @ post toc html here -->
121 <!-- - - -->
123 </xsl:template>
126 <xsl:template name="toc-with-group">
127 <xsl:param name="group"/>
129 <xsl:for-each select="/session/content/document[ ( ( position() - 1 ) mod $group ) = 0 ]">
131 <xsl:call-template name="document-group">
132 <xsl:with-param name="group" select="$group"/>
133 </xsl:call-template>
135 </xsl:for-each>
137 </xsl:template>
139 <xsl:template name="document-group">
140 <xsl:param name="group"/>
142 <!-- @ pre group code here -->
144 <tr>
145 <td width="30" height="200" class="ccolor"></td>
147 <!-- - - -->
149 <xsl:variable name="count" select="(position() - 1) * $group + 1"/>
151 <xsl:for-each select="/session/content/document[$count &lt;= position() and position() &lt; ($count + $group)]">
153 <xsl:apply-templates select="."/>
155 <xsl:if test="last()=1 and position()=last()">
156 <xsl:call-template name="empty-doc"/>
157 </xsl:if>
159 </xsl:for-each>
161 <!-- @ post group code here -->
163 <td colspan="2" class="ccolor"></td>
164 </tr>
166 <!-- - - -->
168 </xsl:template>
170 <xsl:template name="empty-doc">
171 <td width="50"> <p> </p></td>
172 <td width="200"> <p> </p></td>
173 </xsl:template>
176 <!-- also when using groups, in the end it comes
177 to this template, which is called for each document -->
179 <xsl:template match="document">
180 <!-- file format icon -->
182 <td width="50"> <p>
183 <xsl:apply-templates select="@icon"/>
184 </p></td>
186 <td width="200"> <p>
188 <xsl:apply-templates select="@title"/>
189 <xsl:apply-templates select="@description"/>
190 <xsl:apply-templates select="@author"/>
191 <xsl:apply-templates select="@create-date"/>
192 <xsl:apply-templates select="@update-date"/>
193 <xsl:apply-templates select="@filename"/>
194 <xsl:apply-templates select="@format"/>
195 <xsl:apply-templates select="@pages"/>
196 <xsl:apply-templates select="@size"/>
198 </p> </td>
200 </xsl:template>
202 </xsl:stylesheet>