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
7 I use the @ character whereever there is a missing code, so
8 you can use a simple find to navigate and find the
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"
19 doctype-public =
"-//W3C//DTD HTML 4.0 Transitional//EN"
20 omit-xml-declaration =
"yes"
23 <xsl:include href=
"../layout.xsl"/>
26 <!-- =============================
28 ================================== -->
30 <xsl:template name=
"body">
38 <table width=
"100%" border=
"0" cellpadding=
"0" cellspacing=
"0" class=
"tcolor">
40 <xsl:call-template name=
"title"/>
46 <xsl:call-template name=
"toc"/>
61 <xsl:template name=
"title">
63 @ Pre title html code here
66 <td height=
"200%" colspan=
"7" class=
"toctitle">
68 <xsl:value-of select=
"/session/general-info/@title"/>
71 @ Post title html code here
80 <xsl:template name=
"toc">
82 <!-- @ pre toc html here -->
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"/>
96 <!-- use this alternative if you do not need to use groups
97 (uncomment to use - and do not forget to comment the group
100 <!-- <xsl:apply-templates select="/session/content/document"/> -->
102 <!-- @ post toc html here -->
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"/>
122 <xsl:template name=
"document-group">
123 <xsl:param name=
"group"/>
125 <!-- @ pre group code here -->
128 <td width=
"30" height=
"200" class=
"ccolor"></td>
132 <xsl:variable name=
"count" select=
"(position() - 1) * $group + 1"/>
134 <xsl:for-each select=
"/session/content/document[$count <= position() and position() < ($count + $group)]">
136 <xsl:apply-templates select=
"."/>
138 <xsl:if test=
"last()=1 and position()=last()">
139 <xsl:call-template name=
"empty-doc"/>
144 <!-- @ post group code here -->
146 <td colspan=
"2" class=
"ccolor"></td>
153 <xsl:template name=
"empty-doc">
154 <td width=
"50"> <p> </p></td>
155 <td width=
"200"> <p> </p></td>
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 -->
166 <xsl:apply-templates select=
"@icon"/>
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"/>