This file is indexed.

/usr/share/digikam/themes/simplerounded/template.xsl is in digikam-data 4:5.6.0-0ubuntu10.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
<?xml version="1.0" encoding="UTF-8" ?>

<!--   Licence
A theme for the kipi-plugin html export.
Copyright 2009 Franz Dietrich (enaut.w@googlemail.com)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-->

<!-- Documentatione of the parameters:

titlebar - The String that will appear in the titlebar.
thumbnailsPerPage - The maximum number of thumbnails per page.
homepage - The name of the Homepage you want to go back to.
homepageUrl - The Url to the Homepage.

Colors:
background - The Background of the page.
thumbBorderColor - The border of the thumbnails.
navigationColor - The background of the navigation box.
urlColor - The color ofactive urls.
content-bgc - The color of the contentbox.
listBackground - The Color of the Thumb list.
-->
 
<!DOCTYPE stylesheet [
<!ENTITY raquo "&#187;">
<!ENTITY auml "&#x00e4;">
<!ENTITY Uuml "&#220;">
<!ENTITY uuml "&#252;">
<!ENTITY nbsp "&#160;">
<!ENTITY middot "&#183;">
]>


<xsl:transform version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:exsl="http://exslt.org/common"
	extension-element-prefixes="exsl">
	<xsl:output
			method="xml"
			doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
			doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
			version="1.0"
			media-type="text/html"
			encoding="UTF-8"
			indent="yes" />
			
	<!-- Setting some variables to keep the theme flexible.-->
	<xsl:variable name="cssname" select='"layout.css"' /><!-- caution! that file will be overwritten! -->
	<xsl:variable name="styledir" select='"simplerounded/"' /><!-- This can usually be any directory available. It has to contain: the css specified above, the niftyCube.js and the niftyCorners.css -->
	<xsl:variable name="keywords" select='"generated gallery images"' />
	<xsl:variable name="description" select='"a gallery generated by a kipi-plugin"' />
			
	<!-- Setting some variables to keep the code more readable. -->
	<xsl:variable name="numberOfCollections" select="count(collections/collection)" />
	<xsl:variable name="numberOfListPages" select="number(ceiling($numberOfCollections div $thumbnailsPerPage))" />
	
	<!-- Generation of the Headder. -->
	<xsl:template name="head">
		<xsl:param name="relPath" /><!-- the path to the root of the generated galery -->
		<head>
			<meta
				http-equiv="Content-Type"
				content="text/html; charset=UTF-8" />
			<meta
				http-equiv="Content-Script-Type"
				content="text/javascript" />
			<meta
				http-equiv="Content-Style-Type"
				content="text/css" />
			<meta
				name="description">
				<xsl:attribute name="content"> <xsl:value-of select="$description" /></xsl:attribute>
			</meta>
			<meta
				name="keywords">
				<xsl:attribute name="content"> <xsl:value-of select="$keywords" /></xsl:attribute>
			</meta>
			<link rel="stylesheet" type="text/css" href="{$relPath}{$styledir}layout.css" />
			<link rel="stylesheet" type="text/css" href="{$relPath}{$styledir}niftyCorners.css" />
			<title>
				<xsl:value-of select="$titlebar"/>
				&nbsp;
				<xsl:value-of select="fileName" />
				<xsl:value-of select="substring(title, 0, string-length(title) - 3)"/>
			</title>
			<script
				type="text/javascript"
				src="{$relPath}{$styledir}niftycube.js"></script>
			<script
				type="text/javascript">
					window.onload = function()
					{
						Nifty("div.header", "big transparent");
						Nifty("ul.menu a", "same-height transparent");
						Nifty("ul.menu", "big transparent");
						Nifty("div.round", "big transparent");
						Nifty("div.thumb li", "same-height big transparent");
						Nifty("div.thumb", "big fixed-height transparent");
					}
			</script>
		</head>
	</xsl:template>
	
	
<!-- Decide, wether there are more than one collections or not. -->			
	<xsl:template match="/">
		<xsl:choose>
			<xsl:when test="$numberOfCollections = 1">
				<!-- DEBUG <xsl:value-of select="$numberOfCollections" /> -->
				<xsl:for-each select="collections/collection[number(1)]">
					<xsl:call-template name="collectionOverviewPage">
						<xsl:with-param name="workingDir" select="concat(//collection[1]/fileName, '/')"/>
						<xsl:with-param name="currentPage" select="0" />
						<xsl:with-param name="relPath" select="''" />
						<xsl:with-param name="collectionPageCount" select="ceiling(count(//image) div $thumbnailsPerPage)" />
					</xsl:call-template>
				</xsl:for-each>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="collectionListPage">
					<xsl:with-param name="currentPage" select="number(0)" />
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
		<exsl:document
			href="{$styledir}{$cssname}"
			method="text"
			version="1.0"
			encoding="UTF-8"
			media-type="text/css"
			indent="yes">
			<xsl:call-template name="cssstyle" />
		</exsl:document>
	</xsl:template>
	
<!-- This template generates in an recursive fashion the overviewpages for each collection. If one page is full it calls itself again to create a new page. -->
	<xsl:template name="collectionOverviewPage">
		<xsl:param name="workingDir" /> <!-- The directory where the images are stored relative to the working directory. -->
		<xsl:param name="relPath" /> <!-- The directions to the root of the gallery. -->
		<xsl:param name="currentPage" /> <!-- The current Page -->
		<xsl:param name="collectionPageCount" /> <!-- The total count of pages -->
		<html>
			<!-- Include the headder -->
			<xsl:call-template name="head">
				<xsl:with-param name="relPath" select="$relPath" />
			</xsl:call-template>
			
			<body id="collectionPage">
				<div class="round" id="content">
					<h1><xsl:value-of select="name" /></h1>
					<div class="thumb" id="mainpage">
						<ul>
							<!-- Call the single thumbnail generation template. -->
							<xsl:call-template name="collectionOverviewListItem">
								<xsl:with-param name="iterator" select="1" />
								<xsl:with-param name="workingDir" select='$workingDir' />
								<xsl:with-param name="offset" select="number($thumbnailsPerPage * $currentPage)" />
							</xsl:call-template>
						</ul>
						<div class="clear">&nbsp;</div>
					</div>
					<!-- Generate the Navigation below the thumblist. -->
					<div class="round" id="imageNavigationBox">
						<div id="block"> <!-- A workaround for the IE boxmodell. -->
							<p>
								<xsl:if test="$homepage != ''">
									<a href="{$homepageUrl}"><xsl:value-of select="$homepage" /></a>
									&raquo;
								</xsl:if>
								<xsl:if test="$numberOfCollections != 1">
									<a href="../index.html"><xsl:value-of select="$i18nCollectionList" /></a>
								&raquo;
								</xsl:if>
								<a class="inactive" href="#"><xsl:value-of select="name" /></a>
							</p>
							<xsl:if test="$collectionPageCount != 1">
								<p>
									<!-- The "Previous" link -->
									<xsl:choose>
										<xsl:when test="$currentPage = 0">
											<a class="inactive" href="#"><xsl:value-of select="$i18nPrevious" /></a>
										</xsl:when>
										<xsl:when test="$currentPage = 1">
											<a href="index.html"><xsl:value-of select="$i18nPrevious" /></a>
										</xsl:when>
										<xsl:otherwise>
											<a href="{fileName}Page{$currentPage}.html"><xsl:value-of select="$i18nPrevious" /></a>
										</xsl:otherwise>
									</xsl:choose>
									&middot;
									<!-- The pagenumber links. -->
									<xsl:call-template name="pageLink">
										<xsl:with-param name="currentPosition" select="number(1)" />
										<xsl:with-param name="collectionPageCount" select="$collectionPageCount" />
										<xsl:with-param name="baseName" select="fileName" />
										<xsl:with-param name="currentPage" select="$currentPage" />
									</xsl:call-template>
									<!-- The "Next" link.-->
									<xsl:choose>
										<xsl:when test="$currentPage = ($collectionPageCount - 1)">
											<a class="inactive" href="#"><xsl:value-of select="$i18nNext" /></a>
										</xsl:when>
										<xsl:otherwise>
											<a href="{fileName}Page{$currentPage + 2}.html"><xsl:value-of select="$i18nNext" /></a>
										</xsl:otherwise>
									</xsl:choose>
								</p>
							</xsl:if>
						</div> <!-- End of IE borderworkaround -->
					</div><!-- End of imageNavigationBox -->
				</div><!-- End of content. -->
			</body>
		</html>
		<!-- recursive call for the next page. -->
		<xsl:if test="$currentPage &lt; ($collectionPageCount - 1)">
			<exsl:document
				href="{fileName}Page{$currentPage + 2}.html"
				method="xml"
				version="1.0"
				encoding="UTF-8"
				doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
				doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
				media-type="text/html" 
				indent="yes">
				<xsl:call-template name="collectionOverviewPage">
						<xsl:with-param name="workingDir" select="$workingDir"/>
						<xsl:with-param name="relPath" select="$relPath"/>
						<xsl:with-param name="currentPage" select="number($currentPage + 1)" />
						<xsl:with-param name="collectionPageCount" select="$collectionPageCount" />
				</xsl:call-template>
			</exsl:document>
		</xsl:if>
	</xsl:template>

<!-- Generate the thumbnail lists by adding one item and call itself recursively. -->
	<xsl:template name="collectionOverviewListItem">
		<xsl:param name="iterator" />
		<xsl:param name="workingDir" /><!-- The location of the files -->
		<xsl:param name="offset" /><!-- The number of thumbnails that has already been worked on. -->
		
		<xsl:if test="number($iterator) &lt; number($thumbnailsPerPage + 1)">
			<xsl:for-each select="image[number($iterator + $offset)]">
				<li>
					<a href='{$workingDir}{full/@fileName}.html'>
						<img src="{$workingDir}{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}" alt="{full/description}"/>
					</a>
				</li>
				<exsl:document
					href='{$workingDir}{full/@fileName}.html'
					method="xml"
					version="1.0"
					encoding="UTF-8"
					doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
					doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
					media-type="text/html"
					indent="yes">
					<xsl:call-template name="imagePage">
						<xsl:with-param name="iterator" select="number($iterator + $offset)" />
					</xsl:call-template>
				</exsl:document>
			</xsl:for-each>
			<!-- The recursion -->
			<xsl:call-template name="collectionOverviewListItem">
				<xsl:with-param name="iterator" select="$iterator + 1" />
					<xsl:with-param name="workingDir" select="$workingDir" />
					<xsl:with-param name="offset" select="$offset" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>

<!-- Generation of the pagenumbers for each Page. -->
	<xsl:template name="pageLink">
		<xsl:param name="currentPosition" /><!-- The current position iterator. -->
		<xsl:param name="collectionPageCount" /><!-- The total num of pages -->
		<xsl:param name="currentPage" /><!-- The current page. -->
		<xsl:param name="baseName" /> <!-- The basic name for the pages. -->
		<xsl:choose>
			<xsl:when test="$currentPosition = ($currentPage + 1)">
				<a class="inactive" href="#"><xsl:value-of select="$currentPosition"/></a>
				&middot;
			</xsl:when>
			<xsl:when test="$currentPosition = 1">
				<a href="index.html"><xsl:value-of select="$currentPosition"/></a>
				&middot;
			</xsl:when>
			<xsl:otherwise>
				<a href="{$baseName}Page{$currentPosition}.html"><xsl:value-of select="$currentPosition"/></a>
				&middot;
			</xsl:otherwise>
		</xsl:choose>
		<xsl:if test="$currentPosition &lt; $collectionPageCount">
			<xsl:call-template name="pageLink">
				<xsl:with-param name="currentPosition" select="number($currentPosition + 1)" />
				<xsl:with-param name="collectionPageCount" select="$collectionPageCount" />
				<xsl:with-param name="currentPage" select="$currentPage" />
				<xsl:with-param name="baseName" select="$baseName" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	

<!-- ############################ The Template to gererate every single image page. ############################ -->
	<xsl:template name="imagePage">
		<xsl:param name="iterator" /><!-- The psitoin to generate the navigation. -->
		<html>
			<!-- Include the headder information -->
			<xsl:call-template name="head">
				<xsl:with-param name="relPath" select="'../'" />
			</xsl:call-template>
			
			<body id="imagePage">
				<div class="round" id="content">
					<div class="round" id="image">
						<!-- Include the Image. -->
						<img src="{full/@fileName}" width="{full/@width}" height="{full/@height}" alt="{full/description}"/>
						<xsl:if test="description != ''"><!-- Check for original file -->
							<p><!-- Add the comment. -->
								<xsl:value-of select="description"/>
							</p>
						</xsl:if>
						<xsl:if test="original/@fileName != ''"><!-- Check for original file -->
							<p>
								<a href="{original/@fileName}"><xsl:value-of select="$i18nOriginalImage"/></a>
								(<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>)
							</p>
						</xsl:if>
					</div>
					<div class="round" id="imageNavigationBox"><!-- Create the navigation -->
						<div id="block"> <!-- A workaround for the IE boxmodell. -->
							<p><!-- Create the path -->
								<xsl:if test="$homepage != ''">
									<a href="{$homepageUrl}"><xsl:value-of select="$homepage" /></a>
									&raquo;
								</xsl:if>
								<xsl:choose>
									<xsl:when test="$numberOfCollections &gt; 1">
											<a href="../index.html">
												<xsl:value-of select="$i18nCollectionList"/>
											</a>
											&raquo;
											<a href="index.html">
												<xsl:value-of select="../name" />
											</a>
									</xsl:when>
									<xsl:otherwise>
											<a	href="../index.html">
											<xsl:value-of select="../name"/>
											</a>
									</xsl:otherwise>
								</xsl:choose>
								&raquo;
								<a href="#" class="inactive"><xsl:value-of select="substring(title, 0, string-length(title) - 3)"/></a>
							</p>
							<!-- create the navigation bar -->
							<p>
								<xsl:choose>
									<xsl:when test="$iterator &gt; 1">
											<a href="{preceding-sibling::image[position()=1]/full/@fileName}.html">
												<xsl:value-of select="$i18nPrevious" />
											</a>
									</xsl:when>
									<xsl:otherwise>
											<a href="#" class="inactive">
												<xsl:value-of select="$i18nPrevious" />
											</a>
									</xsl:otherwise>
								</xsl:choose>
								&nbsp;
								<a href="#" class="inactive">(<xsl:value-of select="$iterator"/>/<xsl:value-of select="count(../image)"/>)</a>
								&nbsp;
								<xsl:choose>
									<xsl:when test="$iterator &lt; count(../image)">
											<a href="{following-sibling::image[position()=1]/full/@fileName}.html">
												<xsl:value-of select="$i18nNext"/>
											</a>
									</xsl:when>
									<xsl:otherwise>
											<a href="#" class="inactive">
												<xsl:value-of select="$i18nNext"/>
											</a>
									</xsl:otherwise>
								</xsl:choose>
							</p>
						</div>
					</div>
				</div>
			</body>
		</html>
	</xsl:template>

<!-- ############################ Collections list - the collection thumbnailpage ############################ -->
	<xsl:template name="collectionListPage">
		<xsl:param name="currentPage" /><!-- The position to generate the navigation. -->
		
		<xsl:variable name="offset" select="number($thumbnailsPerPage  * $currentPage)"/> <!-- The offset of the current page. -->
		
				<html>
					<!-- Include the headder information -->
					<xsl:call-template name="head">
						<xsl:with-param name="relPath" select="''" />
					</xsl:call-template>
					
					<body id="collectionPage">
						<div class="round" id="content">
							<h1><xsl:value-of select="$i18nCollectionList" /></h1>
							<div class="thumb" id="mainpage">
								<ul>
									<!-- Call the single thumbnail generation template. -->
									<xsl:call-template name="collectionListItem">
										<xsl:with-param name="iterator" select="1" />
										<xsl:with-param name="offset" select="$offset" />
									</xsl:call-template>
								</ul>
								<div class="clear">&nbsp;</div>
							</div>
							<xsl:if test="$numberOfListPages != 1">
								<!-- The navigation. -->
								<div class="round" id="imageNavigationBox">
									<div id="block"> <!-- A workaround for the IE boxmodell. -->
										<xsl:if test="$homepageUrl != ''">
											<p><!-- Create the path -->
												<a href="{$homepageUrl}"><xsl:value-of select="$homepage" /></a>
												&raquo;
												<a class="inactive" href="#"><xsl:value-of select="$i18nCollectionList" /></a>
											</p>
										</xsl:if>
										<p>
											<!-- The "Previous" link -->
											<xsl:choose>
												<xsl:when test="$currentPage = 0">
													<a class="inactive" href="#"><xsl:value-of select="$i18nPrevious" /></a>
												</xsl:when>
												<xsl:when test="$currentPage = 1">
													<a href="index.html"><xsl:value-of select="$i18nPrevious" /></a>
												</xsl:when>
												<xsl:otherwise>
													<a href="{$i18nCollectionList}Page{$currentPage}.html"><xsl:value-of select="$i18nPrevious" /></a>
												</xsl:otherwise>
											</xsl:choose>
											&middot;
											<!-- The pagenumber links. -->
											<xsl:call-template name="pageLink">
												<xsl:with-param name="currentPosition" select="number(1)" />
												<xsl:with-param name="collectionPageCount" select="$numberOfListPages" />
												<xsl:with-param name="baseName" select="$i18nCollectionList" />
												<xsl:with-param name="currentPage" select="$currentPage" />
											</xsl:call-template>
											<!-- The "Next" link.-->
											<xsl:choose>
												<xsl:when test="$currentPage = ($numberOfListPages - 1)">
													<a class="inactive" href="#"><xsl:value-of select="$i18nNext" /></a>
												</xsl:when>
												<xsl:otherwise>
													<a href="{$i18nCollectionList}Page{$currentPage + 2}.html"><xsl:value-of select="$i18nNext" /></a>
												</xsl:otherwise>
											</xsl:choose>
										</p>
									</div>
								</div>
							</xsl:if>
						</div>
					</body>
				</html>
			<!-- Recursion call of this template. -->
			<xsl:if test="($currentPage + 1) &lt; $numberOfListPages">
				<exsl:document
					href='{$i18nCollectionList}Page{number($currentPage + 2)}.html'
					method="xml"
					version="1.0"
					encoding="UTF-8"
					doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
					doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
					media-type="text/html"
					indent="yes">
					<xsl:call-template name="collectionListPage">
						<xsl:with-param name="currentPage" select="number($currentPage + 1)" />
					</xsl:call-template>
				</exsl:document>
			</xsl:if>
	</xsl:template>
	
	<!-- The thumnails for each single collection. -->
	<xsl:template name="collectionListItem">
		<xsl:param name="iterator" />
		<xsl:param name="offset" /><!-- The number of thumbnails that has already been worked on. -->

			<xsl:for-each select="/collections/collection[$iterator + $offset]">
				<li>
					<a href='{fileName}/index.html'>
						<img src="{fileName}/{image[1]/thumbnail/@fileName}" width="{image[1]/thumbnail/@width}" height="{image[1]/thumbnail/@height}" alt="{image[1]/full/description}"/>
						<br />
						<xsl:value-of select="name" />
					</a>
				</li>
				<exsl:document
					href='{fileName}/index.html'
					method="xml"
					version="1.0"
					encoding="UTF-8"
					doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
					doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
					media-type="text/html"
					indent="yes">
					<xsl:call-template name="collectionOverviewPage">
						<xsl:with-param name="workingDir" select="''" />
						<xsl:with-param name="relPath" select="'../'" />
						<xsl:with-param name="currentPage" select="0" />
						<xsl:with-param name="collectionPageCount" select="ceiling(count(image) div $thumbnailsPerPage)" />
					</xsl:call-template>
				</exsl:document>
			</xsl:for-each>

		<!-- The recursion -->
		<xsl:if test="($iterator &lt; $thumbnailsPerPage) and ($iterator &lt;= $numberOfCollections)">
			<xsl:call-template name="collectionListItem">
				<xsl:with-param name="iterator" select="$iterator + 1" />
				<xsl:with-param name="offset" select="$offset" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	
	<!-- Generate the stylesheet -->
	<xsl:template name="cssstyle">@CHARSET "UTF-8";
	
	* {
	    margin:0;
	    padding:0;
	}
	
	body {
		padding: 20px;
		background-color: <xsl:value-of select="$background" />;
	}
	
	div.clear {
		clear: both;
		height: 0;
		width: 0;
	}
	
	
	/**
	 * Headdings
	 */
	h1,h2,h3,h4,h5,h6 {
		font-variant: small-caps;
		text-decoration: underline;
		font-weight: bold;
	}
	
	h1 {
		font-size: 28px;
		padding: 0 0 15px 0;
	}
	
	#imageNavigationBox {
		font-size: 20px;
		margin: 7px 0 0 0;
		padding: 10px;
		text-align: center;
		font-variant: small-caps;
		font-weight: bold;
		background-color: <xsl:value-of select="$navigationColor" />;
	}
	
	#block{
		display: block;
		width: 100%;
	}
	
	#imageNavigationBox a{
		color: <xsl:value-of select="$urlColor" />;
	}
	
	#imageNavigationBox a.inactive{
		color: #000;
	}
	
	/**
	 * Texts
	 */
	p {
		padding: 5px 0;
	}
	
	p:first-letter {
		font-size: 1.3em;
	}
	
	/**
	 * Divboxes
	 */
	div.round, #content {
		margin: 7px 0;
		padding: 25px 25px 10px 25px;
		font-size: 18px;
		text-align: center;
		background-color: <xsl:value-of select="$content-bgc" />;
	}
	
	/**
	 * Images
	 */
	img {
		border: none;
	}
	
	div.thumb {
		background-color: <xsl:value-of select="$listBackground" />;
		margin: 7px 0;
		padding: 10px;
	}
	
	div.thumb li {
		display: block;
		background-color:<xsl:value-of select="$thumbBorderColor" />;
		padding: 12px;
		margin: 4px;
		width: <xsl:value-of select="//image[1]/thumbnail/@width" />px;
		_width:<xsl:value-of select="((//image[1]/thumbnail/@width) + 28)" />px;
		list-style: none;
	}
	
	div#mainpage {
		text-align: center;
	}
	
	div#mainpage li {
		float: left;
		display: block;
		font-size: 15px;
	}
	
	div.thumb a:link {
		color: <xsl:value-of select="$urlColor" />;
		text-decoration: none;
	}
	
	div.thumb a:visited {
		color: <xsl:value-of select="$urlColor" />;
		text-decoration: none;
	}
	</xsl:template>
			
</xsl:transform>