1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 <xsl:stylesheet version=
"1.0"
4 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
5 xmlns=
"http://www.w3.org/1999/xhtml">
7 <xsl:output method =
"html"
8 media-type =
"text/html"
10 doctype-public =
"-//W3C//DTD HTML 4.0 Transitional//EN"
11 omit-xml-declaration =
"yes"
14 <xsl:include href=
"../layout.xsl"/>
17 <!-- =============================
19 ================================== -->
21 <xsl:template name=
"body">
22 <xsl:call-template name=
"title"/>
23 <xsl:call-template name=
"toc"/>
27 <xsl:template name=
"toc">
32 <xsl:apply-templates select=
"/session/content/document"/>
40 <!-- also when using groups, in the end it comes
41 to this template, which is called for each document -->
42 <xsl:template match=
"document">
43 <xsl:variable name=
"i" select=
"position() - 1"/>
44 <xsl:variable name=
"x" select=
"( $i mod 3 ) * 250 + 50"/>
45 <xsl:variable name=
"y" select=
"( $i mod 3 ) * 50 + (floor( $i div 3 )) * 300 + 80"/>
46 <div style=
"position:absolute; padding:15px; left:{$x}px; top:{$y}px; width:170px; height:220px; z-index:1" class=
"tcolor">
49 <xsl:apply-templates select=
"@icon"/>
51 <xsl:apply-templates select=
"@title"/>
52 <xsl:apply-templates select=
"@description"/>
53 <xsl:apply-templates select=
"@author"/>
54 <xsl:apply-templates select=
"@create-date"/>
55 <xsl:apply-templates select=
"@update-date"/>
56 <xsl:apply-templates select=
"@filename"/>
57 <xsl:apply-templates select=
"@format"/>
58 <xsl:apply-templates select=
"@pages"/>
59 <xsl:apply-templates select=
"@size"/>
67 <xsl:template name=
"document-group">
68 <xsl:param name=
"group"/>
70 <!-- @ pre group code here -->
74 <xsl:variable name=
"count" select=
"(position() - 1) * $group + 1"/>
76 <xsl:for-each select=
"/session/content/document[$count <= position() and position() < ($count + $group)]">
78 <xsl:apply-templates select=
"."/>
82 <!-- @ post group code here -->
89 <xsl:template name=
"title">
91 @ Pre title html code here
93 <div style=
"position:absolute; left:280px; top:8px; width:220px; z-index:2; padding:10px" class=
"ccolor">
94 <div align=
"center" class=
"toctitle">
95 <xsl:value-of select=
"/session/general-info/@title"/>
97 @ Post title html code here