merge the formfield patch from ooo-build
[ooovba.git] / extras / source / misc_config / wizard / web / layouts / table_3 / index.html.xsl
blobe5456121f688bbef8eb5bd4885fafa9f1f80695e
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- =================================================
4 This template is a skeleton for single level TOC pages
5 Do not overwrite this ! copy it and complete the missing
6 code.
7 I use the @ character whereever there is a missing code, so
8 you can use a simple find to navigate and find the
9 places...
10 ====================================================== -->
12 <xsl:stylesheet version="1.0"
13 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
14 xmlns="http://www.w3.org/1999/xhtml">
16 <xsl:output method = "html"
17 media-type = "text/html"
18 indent = "yes"
19 doctype-public = "-//W3C//DTD HTML 4.0 Transitional//EN"
20 omit-xml-declaration = "yes"
21 standalone = "yes" />
23 <xsl:include href="../layout.xsl"/>
26 <!-- =============================
27 HTML BODY
28 ================================== -->
30 <xsl:template name="body">
32 <body>
34 <!--
35 @ pre code here
36 -->
38 <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tcolor">
40 <xsl:call-template name="title"/>
42 <!--
43 @ inter code here
44 -->
46 <xsl:call-template name="toc"/>
48 <!--
49 @ post code here
50 -->
52 </table>
54 </body>
56 </xsl:template>
61 <xsl:template name="title">
62 <!--
63 @ Pre title html code here
64 -->
65 <tr>
66 <td height="200%" colspan="9" class="toctitle">
68 <xsl:value-of select="/session/general-info/@title"/>
70 <!--
71 @ Post title html code here
72 -->
74 </td>
75 </tr>
77 </xsl:template>
80 <xsl:template name="toc">
82 <!-- @ pre toc html here -->
84 <!-- - - -->
86 <!-- use this to group documents, it
87 is for example usefull when generating tables -->
91 <xsl:call-template name="toc-with-group">
92 <xsl:with-param name="group" select="3"/>
93 </xsl:call-template>
96 <!-- use this alternative if you do not need to use groups
97 (uncomment to use - and do not forget to comment the group
98 option above...)-->
100 <!-- <xsl:apply-templates select="/session/content/document"/> -->
102 <!-- @ post toc html here -->
104 <!-- - - -->
106 </xsl:template>
109 <xsl:template name="toc-with-group">
110 <xsl:param name="group"/>
112 <xsl:for-each select="/session/content/document[ ( ( position() - 1 ) mod $group ) = 0 ]">
114 <xsl:call-template name="document-group">
115 <xsl:with-param name="group" select="$group"/>
116 </xsl:call-template>
118 </xsl:for-each>
120 </xsl:template>
122 <xsl:template name="document-group">
123 <xsl:param name="group"/>
125 <!-- @ pre group code here -->
127 <tr>
128 <td width="30" height="200" class="ccolor"></td>
130 <!-- - - -->
132 <xsl:variable name="count" select="(position() - 1) * $group + 1"/>
134 <xsl:for-each select="/session/content/document[$count &lt;= position() and position() &lt; ($count + $group)]">
136 <xsl:apply-templates select="."/>
138 <xsl:choose>
139 <xsl:when test="last()=1 and position()=last()">
140 <xsl:call-template name="empty-doc"/>
141 <xsl:call-template name="empty-doc"/>
142 </xsl:when>
143 <xsl:when test="last()=2 and position()=last()">
144 <xsl:call-template name="empty-doc"/>
145 </xsl:when>
146 </xsl:choose>
148 </xsl:for-each>
150 <!-- @ post group code here -->
152 <td colspan="2" class="ccolor"></td>
153 </tr>
155 <!-- - - -->
157 </xsl:template>
159 <xsl:template name="empty-doc">
160 <td width="50"> <p> </p></td>
161 <td width="200"> <p> </p></td>
162 </xsl:template>
165 <!-- also when using groups, in the end it comes
166 to this template, which is called for each document -->
168 <xsl:template match="document">
169 <!-- file format icon -->
171 <td width="50"> <p>
172 <xsl:apply-templates select="@icon"/>
173 </p></td>
175 <td width="200"> <p>
177 <xsl:apply-templates select="@title"/>
178 <xsl:apply-templates select="@description"/>
179 <xsl:apply-templates select="@author"/>
180 <xsl:apply-templates select="@create-date"/>
181 <xsl:apply-templates select="@update-date"/>
182 <xsl:apply-templates select="@filename"/>
183 <xsl:apply-templates select="@format"/>
184 <xsl:apply-templates select="@pages"/>
185 <xsl:apply-templates select="@size"/>
187 </p> </td>
189 </xsl:template>
191 </xsl:stylesheet>