1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
21e519d8dSAndrew Rist<!--***********************************************************
31e519d8dSAndrew Rist *
41e519d8dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
51e519d8dSAndrew Rist * or more contributor license agreements.  See the NOTICE file
61e519d8dSAndrew Rist * distributed with this work for additional information
71e519d8dSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
81e519d8dSAndrew Rist * to you under the Apache License, Version 2.0 (the
91e519d8dSAndrew Rist * "License"); you may not use this file except in compliance
101e519d8dSAndrew Rist * with the License.  You may obtain a copy of the License at
111e519d8dSAndrew Rist *
121e519d8dSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
131e519d8dSAndrew Rist *
141e519d8dSAndrew Rist * Unless required by applicable law or agreed to in writing,
151e519d8dSAndrew Rist * software distributed under the License is distributed on an
161e519d8dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
171e519d8dSAndrew Rist * KIND, either express or implied.  See the License for the
181e519d8dSAndrew Rist * specific language governing permissions and limitations
191e519d8dSAndrew Rist * under the License.
201e519d8dSAndrew Rist *
211e519d8dSAndrew Rist ***********************************************************-->
221e519d8dSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir
25cdf0e10cSrcweir<xsl:stylesheet version="1.0"
26cdf0e10cSrcweir   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
27cdf0e10cSrcweir	xmlns="http://www.w3.org/1999/xhtml">
28cdf0e10cSrcweir
29cdf0e10cSrcweir	<xsl:output method               = "html"
30cdf0e10cSrcweir                media-type           = "text/html"
31cdf0e10cSrcweir                indent               = "yes"
32cdf0e10cSrcweir                doctype-public       = "-//W3C//DTD HTML 4.0 Transitional//EN"
33cdf0e10cSrcweir                omit-xml-declaration = "yes"
34cdf0e10cSrcweir                standalone           = "yes" />
35cdf0e10cSrcweir
36cdf0e10cSrcweir	<xsl:include href="../layout.xsl"/>
37cdf0e10cSrcweir
38cdf0e10cSrcweir
39cdf0e10cSrcweir	 <!-- =============================
40cdf0e10cSrcweir	               ROOT
41cdf0e10cSrcweir	 ================================== -->
42cdf0e10cSrcweir
43cdf0e10cSrcweir
44cdf0e10cSrcweir    <xsl:template  match="/">
45cdf0e10cSrcweir      	<html>
46cdf0e10cSrcweir				   <xsl:call-template name="head"/>
47cdf0e10cSrcweir			      <xsl:call-template name="body"/>
48cdf0e10cSrcweir		   </html>
49cdf0e10cSrcweir	 </xsl:template>
50cdf0e10cSrcweir
51cdf0e10cSrcweir
52cdf0e10cSrcweir	 <!-- =============================
53cdf0e10cSrcweir	               HTML BODY
54cdf0e10cSrcweir	 ================================== -->
55cdf0e10cSrcweir
56cdf0e10cSrcweir	 <xsl:template name="body">
57cdf0e10cSrcweir	 	<body>
58cdf0e10cSrcweir		 	<xsl:call-template name="title"/>
59cdf0e10cSrcweir		 	<xsl:call-template name="toc"/>
60cdf0e10cSrcweir		</body>
61cdf0e10cSrcweir	 </xsl:template>
62cdf0e10cSrcweir
63cdf0e10cSrcweir
64cdf0e10cSrcweir	 <xsl:template name="toc">
65cdf0e10cSrcweir		<!--
66cdf0e10cSrcweir		     @ pre toc html here
67cdf0e10cSrcweir		-->
68cdf0e10cSrcweir
69cdf0e10cSrcweir		<!-- use this to group documents, it
70cdf0e10cSrcweir		is for example usefull when generating tables -->
71cdf0e10cSrcweir
72cdf0e10cSrcweir		<xsl:variable name="group" select="3"/>
73cdf0e10cSrcweir
74cdf0e10cSrcweir		<xsl:for-each select="/session/content/document[ ( ( position() - 1 ) mod $group ) = 0 ]">
75cdf0e10cSrcweir
76cdf0e10cSrcweir			<!--
77cdf0e10cSrcweir				@ pre group html here
78cdf0e10cSrcweir			-->
79cdf0e10cSrcweir
80cdf0e10cSrcweir			<xsl:call-template name="document-group">
81cdf0e10cSrcweir			  <xsl:with-param name="group" select="$group"/>
82cdf0e10cSrcweir			</xsl:call-template>
83cdf0e10cSrcweir
84cdf0e10cSrcweir			<!--
85cdf0e10cSrcweir				@ post group html here
86cdf0e10cSrcweir			-->
87cdf0e10cSrcweir
88cdf0e10cSrcweir		</xsl:for-each>
89cdf0e10cSrcweir
90cdf0e10cSrcweir
91cdf0e10cSrcweir		<!-- use this alternative if you do not need to use groups
92cdf0e10cSrcweir		(uncomment to use - and do not forget to comment the group
93cdf0e10cSrcweir		option above...)-->
94cdf0e10cSrcweir
95cdf0e10cSrcweir		<!--
96cdf0e10cSrcweir	  <xsl:apply-templates select="/session/content/document"/>
97cdf0e10cSrcweir		-->
98cdf0e10cSrcweir
99cdf0e10cSrcweir		<!--
100cdf0e10cSrcweir		     @ post toc html here
101cdf0e10cSrcweir		-->
102cdf0e10cSrcweir
103cdf0e10cSrcweir	 </xsl:template>
104cdf0e10cSrcweir
105cdf0e10cSrcweir	<!-- also when using groups, in the end it comes
106cdf0e10cSrcweir	to this template, which is called for each document -->
107cdf0e10cSrcweir	<xsl:template match="document">
108cdf0e10cSrcweir	  <xsl:apply-templates select="@title"/>
109cdf0e10cSrcweir	  <xsl:apply-templates select="@description"/>
110cdf0e10cSrcweir	  <xsl:apply-templates select="@author"/>
111cdf0e10cSrcweir	  <xsl:apply-templates select="@create-date"/>
112cdf0e10cSrcweir	  <xsl:apply-templates select="@update-date"/>
113cdf0e10cSrcweir	  <xsl:apply-templates select="@filename"/>
114cdf0e10cSrcweir	  <xsl:apply-templates select="@format"/>
115cdf0e10cSrcweir	  <xsl:apply-templates select="@format-icon"/>
116cdf0e10cSrcweir	  <xsl:apply-templates select="@format-icon"/>
117cdf0e10cSrcweir	</xsl:template>
118cdf0e10cSrcweir
119cdf0e10cSrcweir
120cdf0e10cSrcweir
121cdf0e10cSrcweir	 <xsl:template name="document-group">
122cdf0e10cSrcweir	 	<xsl:param name="group"/>
123cdf0e10cSrcweir
124cdf0e10cSrcweir	 	<!-- @ pre group code here -->
125cdf0e10cSrcweir
126cdf0e10cSrcweir	 	<!-- - - -->
127cdf0e10cSrcweir
128cdf0e10cSrcweir		 	<xsl:variable name="count" select="(position() - 1) * $group + 1"/>
129cdf0e10cSrcweir
130cdf0e10cSrcweir		 	<xsl:for-each select="/session/content/document[$count &lt;= position() and position() &lt; ($count + $group)]">
131cdf0e10cSrcweir
132cdf0e10cSrcweir					<xsl:apply-templates select="."/>
133cdf0e10cSrcweir
134cdf0e10cSrcweir		 	</xsl:for-each>
135cdf0e10cSrcweir
136cdf0e10cSrcweir	 	<!-- @ post group code here -->
137cdf0e10cSrcweir
138cdf0e10cSrcweir	 	<!-- - - -->
139cdf0e10cSrcweir
140cdf0e10cSrcweir	 </xsl:template>
141cdf0e10cSrcweir
142cdf0e10cSrcweir
143cdf0e10cSrcweir	 <xsl:template name="title">
144cdf0e10cSrcweir	    <!--
145cdf0e10cSrcweir	      @ Pre title html code here
146cdf0e10cSrcweir	    -->
147cdf0e10cSrcweir
148cdf0e10cSrcweir	    <xsl:value-of select="/session/general-info/@title"/>
149cdf0e10cSrcweir
150cdf0e10cSrcweir	    <!--
151cdf0e10cSrcweir	      @ Post title html code here
152cdf0e10cSrcweir	    -->
153cdf0e10cSrcweir	 </xsl:template>
154cdf0e10cSrcweir
155cdf0e10cSrcweir	 <!-- =============================
156cdf0e10cSrcweir	         Document properties
157cdf0e10cSrcweir
158cdf0e10cSrcweir	 This section contains templates which
159cdf0e10cSrcweir	 give the document properties...
160cdf0e10cSrcweir
161cdf0e10cSrcweir	 ================================== -->
162cdf0e10cSrcweir
163cdf0e10cSrcweir	 <!-- this tempaltes gives the
164cdf0e10cSrcweir	 relative href of the document. To use
165cdf0e10cSrcweir	 with the <a href="..."> attribute-->
166cdf0e10cSrcweir
167cdf0e10cSrcweir
168cdf0e10cSrcweir	 <xsl:template match="document" mode="href">
169cdf0e10cSrcweir	   <xsl:value-of select="concat(../@directory,'/')"/>
170cdf0e10cSrcweir	   <xsl:if test="@dir">
171cdf0e10cSrcweir	     <xsl:value-of select="concat(@dir,'/')"/>
172cdf0e10cSrcweir	   </xsl:if>
173cdf0e10cSrcweir	   <xsl:value-of select="@fn"/>
174cdf0e10cSrcweir	 </xsl:template>
175cdf0e10cSrcweir
176cdf0e10cSrcweir
177cdf0e10cSrcweir	 <xsl:template match="document/@title">
178cdf0e10cSrcweir	 	<span class="doctitle">
179cdf0e10cSrcweir	 		<a>
180cdf0e10cSrcweir	 		<xsl:attribute name="href">
181cdf0e10cSrcweir				<xsl:apply-templates select=".." mode="href"/>
182cdf0e10cSrcweir			</xsl:attribute>
183cdf0e10cSrcweir
184cdf0e10cSrcweir			<xsl:value-of select="."/>
185cdf0e10cSrcweir			</a>
186cdf0e10cSrcweir	 	</span>
187cdf0e10cSrcweir	 	<br/>
188cdf0e10cSrcweir	 </xsl:template>
189cdf0e10cSrcweir
190cdf0e10cSrcweir
191cdf0e10cSrcweir	 <xsl:template match="document/@description">
192cdf0e10cSrcweir	 	<span class="docdescription">
193cdf0e10cSrcweir	 		<xsl:value-of select="."/>
194cdf0e10cSrcweir	 	</span>
195cdf0e10cSrcweir	 	<br/>
196cdf0e10cSrcweir	 </xsl:template>
197cdf0e10cSrcweir
198cdf0e10cSrcweir
199cdf0e10cSrcweir	 <xsl:template match="document/@author">
200cdf0e10cSrcweir	 	<span class="docauthor">
201cdf0e10cSrcweir	 		<xsl:value-of select="."/>
202cdf0e10cSrcweir	 	</span>
203cdf0e10cSrcweir	 	<br/>
204cdf0e10cSrcweir	 </xsl:template>
205cdf0e10cSrcweir
206cdf0e10cSrcweir
207cdf0e10cSrcweir	 <xsl:template match="document/@create-date">
208cdf0e10cSrcweir	 	<span class="doccreationdate">
209cdf0e10cSrcweir	 		<xsl:value-of select="."/>
210cdf0e10cSrcweir	 	</span>
211cdf0e10cSrcweir	 	<br/>
212cdf0e10cSrcweir	 </xsl:template>
213cdf0e10cSrcweir
214cdf0e10cSrcweir
215cdf0e10cSrcweir	 <xsl:template match="document/@update-date">
216*f155a093SAndrea Pescetti	 	<span class="doclastchangeddate">
217cdf0e10cSrcweir	 		<xsl:value-of select="."/>
218cdf0e10cSrcweir	 	</span>
219cdf0e10cSrcweir	 	<br/>
220cdf0e10cSrcweir	 </xsl:template>
221cdf0e10cSrcweir
222cdf0e10cSrcweir
223cdf0e10cSrcweir	 <xsl:template match="document/@filename">
224cdf0e10cSrcweir	 	<span class="docfilename">
225cdf0e10cSrcweir	 		<xsl:value-of select="."/>
226cdf0e10cSrcweir	 	</span>
227cdf0e10cSrcweir	 	<br/>
228cdf0e10cSrcweir	 </xsl:template>
229cdf0e10cSrcweir
230cdf0e10cSrcweir
231cdf0e10cSrcweir	 <xsl:template match="document/@format">
232cdf0e10cSrcweir	 	<span class="docfileformatinfo">
233cdf0e10cSrcweir	 		<xsl:value-of select="."/>
234cdf0e10cSrcweir	 	</span>
235cdf0e10cSrcweir	 	<br/>
236cdf0e10cSrcweir	 </xsl:template>
237cdf0e10cSrcweir
238cdf0e10cSrcweir
239cdf0e10cSrcweir	 <xsl:template match="document/@pages">
240cdf0e10cSrcweir	 	<span class="docnumberofpages">
241cdf0e10cSrcweir	 		<xsl:value-of select="."/>
242cdf0e10cSrcweir	 	</span>
243cdf0e10cSrcweir	 	<br/>
244cdf0e10cSrcweir	 </xsl:template>
245cdf0e10cSrcweir
246cdf0e10cSrcweir
247cdf0e10cSrcweir	 <xsl:template match="document/@size">
248cdf0e10cSrcweir	 	<span class="docsizeinkb">
249cdf0e10cSrcweir	 		<xsl:value-of select="."/>
250cdf0e10cSrcweir	 	</span>
251cdf0e10cSrcweir	 	<br/>
252cdf0e10cSrcweir	 </xsl:template>
253cdf0e10cSrcweir
254cdf0e10cSrcweir	 <xsl:template match="document/@icon">
255cdf0e10cSrcweir	   <img src="images/{.}"/>
256cdf0e10cSrcweir	 	<br/>
257cdf0e10cSrcweir	 </xsl:template>
258cdf0e10cSrcweir
259cdf0e10cSrcweir
260cdf0e10cSrcweir	 <!-- =============================
261cdf0e10cSrcweir	               HTML HEAD
262cdf0e10cSrcweir
263cdf0e10cSrcweir    this section should not be changed
264cdf0e10cSrcweir	 ================================== -->
265cdf0e10cSrcweir
266cdf0e10cSrcweir	 <xsl:template name="head">
267cdf0e10cSrcweir	 	<head>
268cdf0e10cSrcweir				<title>
269cdf0e10cSrcweir				 	<xsl:value-of select="/session/general-info/@title"/>
270cdf0e10cSrcweir				</title>
271cdf0e10cSrcweir				<!-- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -->
272cdf0e10cSrcweir				<meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8"/>
273cdf0e10cSrcweir				<meta name="description" content="{/session/general-info/@description}"/>
274cdf0e10cSrcweir				<meta name="keywords" content="{/session/general-info/@keywords}"/>
275cdf0e10cSrcweir				<meta name="author" content="{/session/general-info/@author}"/>
276cdf0e10cSrcweir				<meta name="email" content="{/session/general-info/@email}"/>
277cdf0e10cSrcweir				<meta name="copyright" content="{/session/general-info/@copyright}"/>
278cdf0e10cSrcweir				<!-- create date?
279cdf0e10cSrcweir				     update date?
280cdf0e10cSrcweir				     fav icon?
281cdf0e10cSrcweir				     -->
282cdf0e10cSrcweir		     <link href="style.css" rel="stylesheet" type="text/css"/>
283cdf0e10cSrcweir
284cdf0e10cSrcweir		</head>
285cdf0e10cSrcweir	 </xsl:template>
286cdf0e10cSrcweir
287cdf0e10cSrcweir</xsl:stylesheet>
288