update dev300-m58
[ooovba.git] / extras / source / misc_config / wizard / web / layouts / zigzag / index.html.xsl
blob4c19d31d29a4404c628accf5da8766ef0e345743
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.
8 I use the @ character whereever there is a missing code, so
9 you can use a simple find to navigate and find the
10 places...
12 ====================================================== -->
13 <!DOCTYPE xsl:stylesheet [
15 <!ENTITY x1 "0">
16 <!ENTITY x2 "250">
17 <!ENTITY x3 "500">
19 <!ENTITY y1 "0">
20 <!ENTITY y2 "150">
21 <!ENTITY y3 "0">
25 <xsl:stylesheet version="1.0"
26 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
27 xmlns="http://www.w3.org/1999/xhtml">
29 <xsl:output method = "html"
30 media-type = "text/html"
31 indent = "yes"
32 doctype-public = "-//W3C//DTD HTML 4.0 Transitional//EN"
33 omit-xml-declaration = "yes"
34 standalone = "yes" />
36 <xsl:include href="../layout.xsl"/>
38 <!-- =============================
39 HTML BODY
40 ================================== -->
42 <xsl:template name="body">
43 <body>
44 <xsl:call-template name="title"/>
45 <xsl:call-template name="toc"/>
46 </body>
47 </xsl:template>
50 <xsl:template name="toc">
51 <!--
52 @ pre toc html here
53 -->
55 <xsl:apply-templates select="/session/content/document"/>
57 <!--
58 @ post toc html here
59 -->
61 </xsl:template>
65 <!-- also when using groups, in the end it comes
66 to this template, which is called for each document -->
67 <xsl:template match="document">
69 <xsl:variable name="i" select="position() - 1"/>
71 <xsl:variable name="x1">
72 <xsl:call-template name="x"/>
73 </xsl:variable>
75 <xsl:variable name="x" select="number($x1) + 50 "/>
77 <xsl:variable name="y1">
78 <xsl:call-template name="y"/>
79 </xsl:variable>
81 <xsl:variable name="y" select="(floor($i div 3)) * 300 + number($y1) + 80 "/>
83 <div style="position:absolute; padding:15px; left:{$x}px; top:{$y}px; width:170px; height:220px; z-index:1" class="tcolor">
84 <div align="center">
86 <xsl:apply-templates select="@icon"/>
87 <p>
88 <xsl:apply-templates select="@title"/>
89 <xsl:apply-templates select="@description"/>
90 <xsl:apply-templates select="@author"/>
91 <xsl:apply-templates select="@create-date"/>
92 <xsl:apply-templates select="@update-date"/>
93 <xsl:apply-templates select="@filename"/>
94 <xsl:apply-templates select="@format"/>
95 <xsl:apply-templates select="@pages"/>
96 <xsl:apply-templates select="@size"/>
97 </p>
98 </div>
99 </div>
100 </xsl:template>
102 <xsl:template name="x">
103 <xsl:variable name="i" select="position()"/>
104 <xsl:choose>
105 <xsl:when test="$i = 2">
106 &x2;
107 </xsl:when>
108 <xsl:when test="$i = 3">
109 &x3;
110 </xsl:when>
111 <xsl:otherwise>
112 <xsl:choose>
113 <xsl:when test="($i mod 3) = 1">
114 &x1;
115 </xsl:when>
116 <xsl:when test="($i mod 3) = 2">
117 &x3;
118 </xsl:when>
119 <xsl:when test="($i mod 3) = 0">
120 &x2;
121 </xsl:when>
122 </xsl:choose>
123 </xsl:otherwise>
124 </xsl:choose>
125 </xsl:template>
127 <xsl:template name="y">
128 <xsl:variable name="i" select="position()"/>
129 <xsl:choose>
130 <xsl:when test="$i = 2">
131 &y2;
132 </xsl:when>
133 <xsl:when test="$i = 3">
134 &y3;
135 </xsl:when>
136 <xsl:otherwise>
137 <xsl:choose>
138 <xsl:when test="($i mod 3) = 1">
139 &y1;
140 </xsl:when>
141 <xsl:when test="($i mod 3) = 2">
142 &y3;
143 </xsl:when>
144 <xsl:when test="($i mod 3) = 0">
145 &y2;
146 </xsl:when>
147 </xsl:choose>
148 </xsl:otherwise>
149 </xsl:choose>
150 </xsl:template>
153 <xsl:template name="document-group">
154 <xsl:param name="group"/>
156 <!-- @ pre group code here -->
158 <!-- - - -->
160 <xsl:variable name="count" select="(position() - 1) * $group + 1"/>
162 <xsl:for-each select="/session/content/document[$count &lt;= position() and position() &lt; ($count + $group)]">
164 <xsl:apply-templates select="."/>
166 </xsl:for-each>
168 <!-- @ post group code here -->
170 <!-- - - -->
172 </xsl:template>
175 <xsl:template name="title">
176 <!--
177 @ Pre title html code here
179 <div style="position:absolute; left:280px; top:8px; width:220px; z-index:2; padding:10px" class="ccolor">
180 <div align="center" class="toctitle">
181 <xsl:value-of select="/session/general-info/@title"/>
182 &#160;
183 <!--
184 @ Post title html code here
186 </div>
187 </div>
188 </xsl:template>
190 </xsl:stylesheet>