[Kde-imaging] kipi htmlexport
Marcelo Anelli Colla
mac at marceloanelli.com
Sat Jan 6 03:24:33 CET 2007
A more complete example:
gallery.xml:
<?xml version="1.0" encoding="UTF-8"?>
<collections>
<cssnombre>style001.css</cssnombre>
<logoimage>site.jpg</logoimage>
<homebutton>homees.jpg</homebutton>
<albumbutton>album.gif</albumbutton>
<firstbutton>firstes.gif</firstbutton>
<previousbutton>previouses.gif</previousbutton>
<nextbutton>nextes.gif</nextbutton>
<lastbutton>lastes.gif</lastbutton>
<gallbutton>galleryes.gif</gallbutton>
<homepage>http://www.marceloanelli.com/fotos/index.html</homepage>
<collection>
<name>20061102 Casa</name>
<fileName>20061102_casa</fileName>
<image>
<title>pb012901.jpg</title>
<description></description>
<full fileName="pb012901_jpg.jpeg" height="480" width="640"/>
<thumbnail fileName="thumb_pb012901_jpg.jpeg" height="120" width="120"/>
</image>
...
the template file (part):
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE stylesheet [
<!ENTITY raquo "»">
]>
<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:variable name="cssnombre" select="/collections/cssnombre"/>
<xsl:variable name="logoimage" select="/collections/logoimage"/>
<xsl:variable name="homebutton" select="/collections/homebutton"/>
<xsl:variable name="albumbutton" select="/collections/albumbutton"/>
<xsl:variable name="firstbutton" select="/collections/firstbutton"/>
<xsl:variable name="previousbutton" select="/collections/previousbutton"/>
<xsl:variable name="nextbutton" select="/collections/nextbutton"/>
<xsl:variable name="lastbutton" select="/collections/lastbutton"/>
<xsl:variable name="gallbutton" select="/collections/gallbutton"/>
<xsl:variable name="homepage" select="/collections/homepage"/>
<xsl:template name="imagePage">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><xsl:value-of select="title"/></title>
<link rel="stylesheet" type="text/css" href="../mac04/{$cssnombre}"/>
</head>
<body>
<div id="logo"><xsl:value-of select="title"/> (<xsl:value-of
select="position()"/> de <xsl:value-of select="last()"/>) </div>
<div id="trail">
<a title="Homepage" href="{$homepage}" >
<img src="../mac04/{$homebutton}" /> </a>
</div>
<div id="menu">
<img src="../mac04/{$logoimage}" /><br/>
<xsl:choose>
<xsl:when test="count(/collections/collection) > 1">
<a class="menuitem" href="../index.html"><img
src="../mac04/{$gallbutton}" /></a>
<a class="menuitem" href="../{../fileName}.html"><img
src="../mac04/{$albumbutton}" /></a>
</xsl:when>
<xsl:otherwise>
<a class="menuitem" href="../index.html"><img
src="../mac04/{$albumbutton}" /></a>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="position() > 1">
<a class="menuitem"
href="{preceding-sibling::image[position()]/full/@fileName}.html">
<img src="../mac04/{$firstbutton}" title="Primera" /></a>
<a class="menuitem"
href="{preceding-sibling::image[position()=1]/full/@fileName}.html">
<img src="../mac04/{$previousbutton}" title="{$i18nPrevious}" /></a>
</xsl:when>
<xsl:otherwise>
<img src="../mac04/{$firstbutton}" title="Primera" />
<img src="../mac04/{$previousbutton}" title="{$i18nPrevious}" />
The theme desktop file:
[Desktop Entry]
Name=Mac04
Name[es]=Mac04
Comment=Mac04: buttons from http://www.cooltext.com/
Comment[es]=Mac04: botones de http://www.cooltext.com/
[X-HTMLExport Author]
Name=Marcelo Anelli C.
Url=mailto:mac at marceloanelli.info.ve
[Variables]
cssnombre=style001.css
logoimage=site.jpg
homebutton=homees.jpg
albumbutton=album.gif
firstbutton=firstes.gif
previousbutton>previouses.gif
nextbutton=nextes.gif
lastbutton=lastes.gif
gallbutton=galleryes.gif
homepage=http://www.marceloanelli.com/fotos/index.html
More information about the Kde-imaging
mailing list