aboutsummaryrefslogtreecommitdiff
path: root/xsl/thumbed.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'xsl/thumbed.xsl')
-rw-r--r--xsl/thumbed.xsl31
1 files changed, 31 insertions, 0 deletions
diff --git a/xsl/thumbed.xsl b/xsl/thumbed.xsl
new file mode 100644
index 0000000..b5a7169
--- /dev/null
+++ b/xsl/thumbed.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:dyn="http://exslt.org/dynamic"
+ extension-element-prefixes="dyn"
+ >
+ <xsl:output method="xml"/>
+ <xsl:include href="identity.xsl"/>
+
+ <xsl:template match="head">
+ <head>
+ <xsl:apply-templates/>
+ <link rel="stylesheet" type="text/css" href="resolve:thumbs-s"/>
+ </head>
+ </xsl:template>
+
+ <xsl:template match="img">
+ <div class="picture">
+
+ <xsl:choose>
+ <xsl:when test="@thumb">
+ <a href="{@src}"><img src="{@thumb}"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <img src="{@src}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="@caption"><br/><p><xsl:value-of select="@caption"/></p></xsl:if>
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet>