merge the formfield patch from ooo-build
[ooovba.git] / extras / source / misc_config / wizard / web / layouts / table_2 / index.html.xsl
blob2ce0788a0c93836282891bc711a0916d1570b208
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="7" 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="2"/>
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:if test="last()=1 and position()=last()">
139 <xsl:call-template name="empty-doc"/>
140 </xsl:if>
142 </xsl:for-each>
144 <!-- @ post group code here -->
146 <td colspan="2" class="ccolor"></td>
147 </tr>
149 <!-- - - -->
151 </xsl:template>
153 <xsl:template name="empty-doc">
154 <td width="50"> <p> </p></td>
155 <td width="200"> <p> </p></td>
156 </xsl:template>
159 <!-- also when using groups, in the end it comes
160 to this template, which is called for each document -->
162 <xsl:template match="document">
163 <!-- file format icon -->
165 <td width="50"> <p>
166 <xsl:apply-templates select="@icon"/>
167 </p></td>
169 <td width="200"> <p>
171 <xsl:apply-templates select="@title"/>
172 <xsl:apply-templates select="@description"/>
173 <xsl:apply-templates select="@author"/>
174 <xsl:apply-templates select="@create-date"/>
175 <xsl:apply-templates select="@update-date"/>
176 <xsl:apply-templates select="@filename"/>
177 <xsl:apply-templates select="@format"/>
178 <xsl:apply-templates select="@pages"/>
179 <xsl:apply-templates select="@size"/>
181 </p> </td>
183 </xsl:template>
185 </xsl:stylesheet>