2006-01-06 19:51:03 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
2006-08-03 16:26:23 +02:00
|
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
2006-01-06 19:51:03 +01:00
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
2011-03-28 19:42:19 +02:00
|
|
|
xmlns:rss="http://purl.org/rss/1.0/"
|
|
|
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
2006-01-06 19:51:03 +01:00
|
|
|
xmlns:date="http://exslt.org/dates-and-times"
|
2008-04-17 17:29:02 +02:00
|
|
|
xmlns:str="http://exslt.org/strings"
|
2011-03-28 19:42:19 +02:00
|
|
|
exclude-result-prefixes="xsl rss rdf date str">
|
2006-01-06 19:51:03 +01:00
|
|
|
|
|
|
|
<xsl:template match="pre">
|
2015-09-25 21:13:11 +02:00
|
|
|
<pre>
|
2015-10-26 00:10:17 +01:00
|
|
|
<xsl:call-template name="auto-id"/>
|
2015-09-25 21:13:11 +02:00
|
|
|
<xsl:apply-templates/>
|
|
|
|
</pre>
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="p">
|
2006-07-21 00:36:10 +02:00
|
|
|
<xsl:if test="@title">
|
|
|
|
<h3>
|
2015-10-26 00:10:17 +01:00
|
|
|
<xsl:call-template name="auto-id"/>
|
2006-07-21 00:36:10 +02:00
|
|
|
<xsl:value-of select="@title"/>
|
|
|
|
</h3>
|
|
|
|
</xsl:if>
|
2015-06-19 02:21:07 +02:00
|
|
|
|
2015-09-25 18:10:12 +02:00
|
|
|
<p>
|
2015-09-25 21:13:11 +02:00
|
|
|
<xsl:if test="@itemprop">
|
|
|
|
<xsl:attribute name="itemprop"><xsl:value-of select="@itemprop"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemscope">
|
|
|
|
<xsl:attribute name="itemscope"><xsl:value-of select="@itemscope"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemtype">
|
|
|
|
<xsl:attribute name="itemtype"><xsl:value-of select="@itemtype"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
2015-09-25 18:10:12 +02:00
|
|
|
<xsl:if test="@class">
|
|
|
|
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
2015-09-25 21:13:11 +02:00
|
|
|
|
2015-06-19 02:21:07 +02:00
|
|
|
<xsl:if test="not(@title)">
|
2015-10-26 00:10:17 +01:00
|
|
|
<xsl:call-template name="auto-id"/>
|
2015-06-19 02:21:07 +02:00
|
|
|
</xsl:if>
|
2006-01-14 20:47:16 +01:00
|
|
|
<xsl:apply-templates/>
|
2006-07-21 00:36:10 +02:00
|
|
|
</p>
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2015-09-25 21:13:11 +02:00
|
|
|
<xsl:template match="div">
|
|
|
|
<xsl:if test="@title">
|
|
|
|
<h3>
|
2015-10-26 00:10:17 +01:00
|
|
|
<xsl:call-template name="auto-id"/>
|
2015-09-25 21:13:11 +02:00
|
|
|
<xsl:value-of select="@title"/>
|
|
|
|
</h3>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<xsl:if test="@itemprop">
|
|
|
|
<xsl:attribute name="itemprop"><xsl:value-of select="@itemprop"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemscope">
|
|
|
|
<xsl:attribute name="itemscope"><xsl:value-of select="@itemscope"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemtype">
|
|
|
|
<xsl:attribute name="itemtype"><xsl:value-of select="@itemtype"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="@class">
|
|
|
|
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="not(@title)">
|
2015-10-26 00:10:17 +01:00
|
|
|
<xsl:call-template name="auto-id"/>
|
2015-09-25 21:13:11 +02:00
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</div>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="span">
|
|
|
|
<span>
|
|
|
|
<xsl:if test="@itemprop">
|
|
|
|
<xsl:attribute name="itemprop"><xsl:value-of select="@itemprop"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemscope">
|
|
|
|
<xsl:attribute name="itemscope"><xsl:value-of select="@itemscope"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemtype">
|
|
|
|
<xsl:attribute name="itemtype"><xsl:value-of select="@itemtype"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="@class">
|
|
|
|
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="@title">
|
|
|
|
<!-- todo: conditional in case class is "value-title" -->
|
|
|
|
<xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</span>
|
|
|
|
</xsl:template>
|
|
|
|
|
2015-09-25 22:23:27 +02:00
|
|
|
<xsl:template match="time">
|
|
|
|
<time>
|
|
|
|
<xsl:if test="@itemprop">
|
|
|
|
<xsl:attribute name="itemprop"><xsl:value-of select="@itemprop"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemscope">
|
|
|
|
<xsl:attribute name="itemscope"><xsl:value-of select="@itemscope"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemtype">
|
|
|
|
<xsl:attribute name="itemtype"><xsl:value-of select="@itemtype"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@datetime">
|
|
|
|
<xsl:attribute name="datetime"><xsl:value-of select="@datetime"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="@class">
|
|
|
|
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="@title">
|
|
|
|
<!-- todo: conditional in case class is "value-title" -->
|
|
|
|
<xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</time>
|
|
|
|
</xsl:template>
|
|
|
|
|
2006-01-06 19:51:03 +01:00
|
|
|
<xsl:template match="dl">
|
2009-05-09 17:32:25 +02:00
|
|
|
<dl class="{@class}">
|
2015-10-26 00:10:17 +01:00
|
|
|
<xsl:call-template name="auto-id"/>
|
2009-05-09 17:32:25 +02:00
|
|
|
<xsl:apply-templates/>
|
|
|
|
</dl>
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="dh">
|
2015-10-26 00:10:17 +01:00
|
|
|
<dt class="main"><xsl:call-template name="auto-id"/><xsl:apply-templates/></dt>
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="dt">
|
2015-10-26 00:10:17 +01:00
|
|
|
<dt><xsl:call-template name="auto-id"/><xsl:apply-templates/></dt>
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="dd">
|
2015-10-26 00:10:17 +01:00
|
|
|
<dd><xsl:call-template name="auto-id"/><xsl:apply-templates/></dd>
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2006-04-09 21:36:13 +02:00
|
|
|
<xsl:template match="ul">
|
2015-09-25 21:56:00 +02:00
|
|
|
<ul>
|
2015-10-26 00:10:17 +01:00
|
|
|
<xsl:call-template name="auto-id"/>
|
2015-09-25 21:56:00 +02:00
|
|
|
<xsl:if test="@itemprop">
|
|
|
|
<xsl:attribute name="itemprop"><xsl:value-of select="@itemprop"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemscope">
|
|
|
|
<xsl:attribute name="itemscope"><xsl:value-of select="@itemscope"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@itemtype">
|
|
|
|
<xsl:attribute name="itemtype"><xsl:value-of select="@itemtype"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="@class">
|
|
|
|
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</ul>
|
2006-04-09 21:36:13 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="ol">
|
2015-10-26 00:10:17 +01:00
|
|
|
<ol><xsl:call-template name="auto-id"/><xsl:apply-templates/></ol>
|
2006-04-09 21:36:13 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="li">
|
2006-08-03 16:45:22 +02:00
|
|
|
<li><xsl:apply-templates/></li>
|
2006-04-09 21:36:13 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
2014-07-08 22:37:57 +02:00
|
|
|
<xsl:template match="blockquote">
|
2015-10-26 00:10:17 +01:00
|
|
|
<blockquote><xsl:call-template name="auto-id"/><xsl:apply-templates/></blockquote>
|
2014-07-08 22:37:57 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
2013-10-15 22:03:35 +02:00
|
|
|
<!-- Bilder in News-Einträgen haben Pfad immer relativ zu /images/news/ -->
|
2006-01-06 19:51:03 +01:00
|
|
|
<xsl:template match="image">
|
2010-11-09 23:14:23 +01:00
|
|
|
<xsl:variable name="path">
|
|
|
|
<xsl:call-template name="normalize-path">
|
2013-03-31 15:42:02 +02:00
|
|
|
<xsl:with-param name="path">
|
|
|
|
<xsl:choose>
|
2013-03-31 17:01:56 +02:00
|
|
|
<!-- use it like this: <image thumb="no">http://upload.wikimedia.org/commons/h/ha/picture.img</image> -->
|
|
|
|
<xsl:when test="not(@thumb='no') and contains(string(.), '://') and contains(string(.), 'wikimedia.org')">
|
2013-03-31 16:24:28 +02:00
|
|
|
<xsl:variable name="filename">
|
|
|
|
<xsl:value-of select="string(str:tokenize(string(.),'/')[last()])"/>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="hash">
|
|
|
|
<xsl:value-of select="concat(str:tokenize(string(.),'/')[position()=last()-2],'/',str:tokenize(string(.),'/')[position()=last()-1],'/')"/>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="validfilename">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="contains($filename, '.svg') and string-length(substring-after($filename, '.svg'))=0">
|
|
|
|
<xsl:value-of select="concat($filename, '.png')"/>
|
|
|
|
</xsl:when>
|
2013-10-15 22:03:35 +02:00
|
|
|
<xsl:when test="contains(., '://')">
|
|
|
|
<xsl:value-of select="."/>
|
|
|
|
</xsl:when>
|
2013-03-31 16:24:28 +02:00
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="$filename"/>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:value-of select="concat(substring-before(string(.),'commons/'),'commons/thumb/',$hash,$filename,'/600px-',$validfilename)"/>
|
|
|
|
</xsl:when>
|
2013-10-15 22:03:35 +02:00
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="concat($baseurl, .)"/>
|
|
|
|
</xsl:otherwise>
|
2013-03-31 16:24:28 +02:00
|
|
|
</xsl:choose>
|
2013-03-31 15:42:02 +02:00
|
|
|
</xsl:with-param>
|
2010-11-09 23:14:23 +01:00
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
2006-08-03 16:45:22 +02:00
|
|
|
<img
|
2010-11-09 23:14:23 +01:00
|
|
|
src="{$path}"
|
2006-10-20 19:17:04 +02:00
|
|
|
title="{@title}"
|
|
|
|
alt="{@title}"
|
|
|
|
class="{@class}"/>
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2013-10-15 22:03:35 +02:00
|
|
|
<xsl:template match="item/image[1]">
|
2011-07-13 22:21:00 +02:00
|
|
|
<xsl:variable name="path">
|
|
|
|
<xsl:call-template name="normalize-path">
|
|
|
|
<xsl:with-param name="path">
|
2013-10-15 22:03:35 +02:00
|
|
|
<xsl:value-of select="concat($baseurl, 'images/news/', .)"/>
|
2011-07-13 22:21:00 +02:00
|
|
|
</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<img
|
|
|
|
src="{$path}"
|
|
|
|
title="{@title}"
|
|
|
|
alt="{@title}"
|
|
|
|
class="{@class}"/>
|
|
|
|
</xsl:template>
|
|
|
|
|
2006-01-06 19:51:03 +01:00
|
|
|
<xsl:template match="link">
|
2006-11-01 00:37:06 +01:00
|
|
|
<xsl:variable name="href">
|
2007-05-18 15:25:53 +02:00
|
|
|
<xsl:call-template name="make-href">
|
|
|
|
<xsl:with-param name="href" select="@href"/>
|
|
|
|
</xsl:call-template>
|
2006-11-01 00:37:06 +01:00
|
|
|
</xsl:variable>
|
2006-08-03 16:45:22 +02:00
|
|
|
|
2006-11-01 00:37:06 +01:00
|
|
|
<a href="{$href}">
|
2009-10-02 23:10:58 +02:00
|
|
|
<xsl:if test="@class">
|
|
|
|
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
2006-01-06 19:51:03 +01:00
|
|
|
<xsl:apply-templates/>
|
2006-08-03 16:45:22 +02:00
|
|
|
</a>
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2007-05-18 15:25:53 +02:00
|
|
|
<xsl:template name="make-href">
|
|
|
|
<xsl:param name="href"/>
|
|
|
|
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="$href and not(contains($href, ':'))">
|
|
|
|
<xsl:value-of select="concat($baseurl,$href)"/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="$href">
|
|
|
|
<xsl:value-of select="$href"/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="."/>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
|
2014-09-11 12:35:11 +02:00
|
|
|
<xsl:template match="code">
|
|
|
|
<code>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</code>
|
|
|
|
</xsl:template>
|
2006-01-06 19:51:03 +01:00
|
|
|
<xsl:template match="em">
|
2006-08-03 16:45:22 +02:00
|
|
|
<em>
|
2012-03-18 12:56:39 +01:00
|
|
|
<xsl:apply-templates/>
|
2006-08-03 16:45:22 +02:00
|
|
|
</em>
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:template>
|
2012-03-18 12:56:39 +01:00
|
|
|
<xsl:template match="strong">
|
|
|
|
<strong>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</strong>
|
|
|
|
</xsl:template>
|
2014-10-07 23:46:28 +02:00
|
|
|
<xsl:template match="sup">
|
|
|
|
<sup>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</sup>
|
|
|
|
</xsl:template>
|
2006-01-06 19:51:03 +01:00
|
|
|
|
2009-02-01 09:07:22 +01:00
|
|
|
<xsl:template match="xhtml:*"
|
|
|
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
|
|
<xsl:copy-of select="."/>
|
|
|
|
</xsl:template>
|
|
|
|
|
2006-01-11 19:12:08 +01:00
|
|
|
<xsl:template name="navitem">
|
|
|
|
<xsl:param name="file"/>
|
2006-05-24 02:19:45 +02:00
|
|
|
<xsl:param name="baseurl"/>
|
2006-07-25 23:24:59 +02:00
|
|
|
<xsl:param name="title"/>
|
2006-01-11 19:12:08 +01:00
|
|
|
<li>
|
2006-07-25 23:24:59 +02:00
|
|
|
<a href="{$baseurl}{$file}.html">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="string-length($title) = 0">
|
|
|
|
<xsl:if test="document(concat('../content/pages/', $file, '.xml'))/page/@pagetitle">
|
|
|
|
<xsl:attribute name="title"><xsl:value-of select="document(concat('../content/pages/', $file, '.xml'))/page/@pagetitle"/></xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:value-of select="document(concat('../content/pages/', $file, '.xml'))/page/@title"/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="$title"/>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</a>
|
2006-01-11 19:12:08 +01:00
|
|
|
</li>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="navitems">
|
2013-11-12 00:16:21 +01:00
|
|
|
<xsl:for-each select="document('../content/navigation.xml')/navigation/group">
|
|
|
|
<ul>
|
|
|
|
<xsl:for-each select="file">
|
|
|
|
<xsl:call-template name="navitem">
|
|
|
|
<xsl:with-param name="file" select="."/>
|
|
|
|
<xsl:with-param name="title" select="@title"/>
|
|
|
|
<xsl:with-param name="baseurl" select="$baseurl"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:for-each>
|
|
|
|
</ul>
|
|
|
|
</xsl:for-each>
|
2006-01-11 19:12:08 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2013-11-13 02:05:35 +01:00
|
|
|
<!-- Chaosupdates in tile -->
|
2011-10-28 21:46:40 +02:00
|
|
|
|
2006-01-11 19:12:08 +01:00
|
|
|
<xsl:template name="chaosupdates">
|
2006-12-08 00:26:47 +01:00
|
|
|
<xsl:param name="limit" select="5"/>
|
2013-11-13 02:05:35 +01:00
|
|
|
|
|
|
|
<h3>
|
|
|
|
<a href="{document('../chaosupdates.xml')/rdf:RDF/rss:channel/rss:link}">
|
|
|
|
<xsl:value-of select="document('../chaosupdates.xml')/rdf:RDF/rss:channel/rss:title"/>
|
|
|
|
</a>
|
|
|
|
</h3>
|
|
|
|
<ul>
|
|
|
|
<xsl:for-each select="document('../chaosupdates.xml')/rdf:RDF/rss:item[position() <= $limit]">
|
|
|
|
<li>
|
|
|
|
<a href="{rss:link}">
|
|
|
|
<xsl:value-of select="rss:title"/>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</xsl:for-each>
|
|
|
|
</ul>
|
2006-01-11 19:12:08 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2013-11-13 02:05:35 +01:00
|
|
|
<!-- Calendar in tile -->
|
2011-10-28 21:46:40 +02:00
|
|
|
|
2006-11-10 02:16:50 +01:00
|
|
|
<xsl:template name="calendar-events">
|
2013-05-10 18:58:36 +02:00
|
|
|
<xsl:param name="limit" select="5"/>
|
2007-05-18 15:25:53 +02:00
|
|
|
|
2013-11-12 00:16:21 +01:00
|
|
|
<ul>
|
|
|
|
<xsl:for-each select="document('../calendar-summary.xml')/page/calendar-summary/event[date:seconds(end) >= date:seconds(date:date())]">
|
|
|
|
<xsl:sort select="date:seconds(start)" data-type="number" order="ascending" />
|
|
|
|
|
|
|
|
<xsl:if test="position() <= $limit">
|
|
|
|
<xsl:variable name="href">
|
|
|
|
<xsl:call-template name="make-href">
|
|
|
|
<xsl:with-param name="href" select="link"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<li>
|
2014-02-28 02:56:00 +01:00
|
|
|
<xsl:call-template name="datespan-to-human">
|
|
|
|
<xsl:with-param name="start" select="start"/>
|
|
|
|
<xsl:with-param name="end" select="end"/>
|
|
|
|
</xsl:call-template>:
|
|
|
|
<a>
|
|
|
|
<xsl:if test="string-length($href) > 0">
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="$href"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
2014-02-28 23:57:50 +01:00
|
|
|
<!-- vv01f:
|
|
|
|
added link to a specific date in calndar
|
|
|
|
#eventday-* is to be handeled with css
|
|
|
|
-->
|
2014-02-28 02:56:00 +01:00
|
|
|
<xsl:if test="string-length($href) = 0">
|
|
|
|
<xsl:attribute name="href">
|
2014-02-28 23:57:50 +01:00
|
|
|
<xsl:value-of select="concat('calendar.html#eventday-',concat(date:month-in-year(start), '-'), date:day-in-month(start))"/>
|
2014-02-28 02:56:00 +01:00
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="string-length(location) > 0">
|
|
|
|
<xsl:attribute name="title">
|
|
|
|
<xsl:value-of select="concat('Ort: ', location)"/>
|
|
|
|
<xsl:if test="string-length(date:time(start)) > 0 or string-length(date:time(end)) > 0">
|
|
|
|
<xsl:value-of select="concat('
', 'Zeit:')" disable-output-escaping="yes"/>
|
|
|
|
<xsl:if test="string-length(date:time(start)) > 0 and substring(date:time(start),1,5) != ''">
|
|
|
|
<xsl:value-of select="concat(' ab ', substring(date:time(start),1,5))"/>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="string-length(date:time(end)) > 0 and substring(date:time(end),1,5) != '' and substring(date:time(end),1,5) != substring(date:time(start),1,5)">
|
|
|
|
<xsl:value-of select="concat(' bis ', substring(date:time(end),1,5))"/>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:value-of select="title"/>
|
|
|
|
</a>
|
2013-11-12 00:16:21 +01:00
|
|
|
</li>
|
2014-02-28 02:56:00 +01:00
|
|
|
|
2013-11-12 00:16:21 +01:00
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>
|
|
|
|
</ul>
|
2006-11-10 02:16:50 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2006-07-26 03:36:40 +02:00
|
|
|
<!-- Support für <event/> bzw. Microformats -->
|
|
|
|
<xsl:include href="date.xsl" />
|
2011-09-25 02:56:17 +02:00
|
|
|
<xsl:template match="item/event">
|
|
|
|
<dl>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</dl>
|
|
|
|
</xsl:template>
|
|
|
|
|
2006-07-26 03:36:40 +02:00
|
|
|
<xsl:template match="item/event/start">
|
2011-07-22 03:31:29 +02:00
|
|
|
<xsl:variable name="start" select="."/>
|
|
|
|
<xsl:variable name="end" select="../end"/>
|
2011-09-25 02:56:17 +02:00
|
|
|
|
|
|
|
<dt>Datum</dt>
|
|
|
|
<dd>
|
|
|
|
<abbr class="dtstart">
|
|
|
|
<xsl:attribute name="title">
|
|
|
|
<xsl:call-template name="date-to-hevent">
|
|
|
|
<xsl:with-param name="date" select="$start"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:attribute>
|
|
|
|
|
|
|
|
<xsl:call-template name="get-datestring">
|
|
|
|
<xsl:with-param name="date" select="$start"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</abbr>
|
|
|
|
|
|
|
|
<xsl:if test="$end">
|
|
|
|
bis
|
|
|
|
<abbr class="dtend">
|
|
|
|
<xsl:attribute name="title">
|
|
|
|
<xsl:call-template name="date-to-hevent">
|
|
|
|
<xsl:with-param name="date" select="$end"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:attribute>
|
|
|
|
|
|
|
|
<xsl:choose>
|
|
|
|
<!-- Ends on same day it starts? -->
|
|
|
|
<xsl:when test="date:date($start) = date:date($end)">
|
|
|
|
<xsl:call-template name="get-timestring">
|
2011-07-22 03:31:29 +02:00
|
|
|
<xsl:with-param name="date" select="$end"/>
|
|
|
|
</xsl:call-template>
|
2011-09-25 02:56:17 +02:00
|
|
|
</xsl:when>
|
|
|
|
<!-- Event spans days -->
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:call-template name="get-datestring">
|
|
|
|
<xsl:with-param name="date" select="$end"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</abbr>
|
|
|
|
</xsl:if>
|
|
|
|
</dd>
|
2006-07-26 03:36:40 +02:00
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="item/event/end">
|
2011-07-22 03:31:29 +02:00
|
|
|
<!-- Output already for item/event/start above -->
|
2006-07-26 03:36:40 +02:00
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="item/event/location">
|
2011-09-25 02:56:17 +02:00
|
|
|
<dt>Ort</dt>
|
|
|
|
<dd class="location"><xsl:apply-templates/></dd>
|
2006-07-26 03:36:40 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
2011-10-28 21:46:40 +02:00
|
|
|
<!-- Resources/alternatives in HTML -->
|
|
|
|
|
|
|
|
<xsl:template match="resource">
|
2011-10-29 03:36:22 +02:00
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="not(starts-with(@type, 'video/')) or count(resource[not(starts-with(@type, 'video/'))]) > 0">
|
|
|
|
<!-- Is not only video/* -->
|
|
|
|
<ul>
|
|
|
|
<xsl:call-template name="resource-item"/>
|
|
|
|
<xsl:apply-templates mode="resource"/>
|
|
|
|
</ul>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<!-- Video only -->
|
|
|
|
<xsl:call-template name="video-resource"/>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
2011-10-28 21:46:40 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="resource/alternative" mode="resource">
|
|
|
|
<xsl:call-template name="resource-item">
|
|
|
|
<xsl:with-param name="title">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="@title"><xsl:value-of select="@title"/></xsl:when>
|
|
|
|
<xsl:otherwise><xsl:value-of select="../@title"/></xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="resource-item">
|
|
|
|
<xsl:param name="title" select="@title"/>
|
|
|
|
<xsl:variable name="href">
|
|
|
|
<xsl:call-template name="make-href">
|
|
|
|
<xsl:with-param name="href" select="@url"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<!-- @class = "resource" | "alternative" -->
|
|
|
|
<li class="{name(.)}">
|
|
|
|
<!-- HTML5 dataset hints for play-resources.js poster -->
|
|
|
|
<xsl:if test="@poster">
|
|
|
|
<xsl:attribute name="data-poster">
|
|
|
|
<xsl:value-of select="@poster"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@preview">
|
|
|
|
<xsl:attribute name="data-preview">
|
|
|
|
<xsl:value-of select="@preview"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<!-- MIME type hinting works even in the browser -->
|
|
|
|
<a href="{$href}" type="{@type}" class="mime" rel="enclosure">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="string-length(string($title))"><xsl:value-of select="$title"/></xsl:when>
|
|
|
|
<xsl:otherwise><xsl:value-of select="$href"/></xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</a>
|
|
|
|
|
2016-03-24 00:54:11 +01:00
|
|
|
<span class="resource-meta">
|
|
|
|
(<xsl:call-template name="mime-for-human">
|
|
|
|
<xsl:with-param name="mime" select="@type"/>
|
|
|
|
</xsl:call-template>, <xsl:call-template name="format-filesize">
|
|
|
|
<xsl:with-param name="value" select="@size"/>
|
|
|
|
</xsl:call-template>)
|
|
|
|
</span>
|
2012-06-27 03:39:58 +02:00
|
|
|
|
|
|
|
<xsl:if test="$baseurl = '' or $baseurl = '../'">
|
|
|
|
<!-- Include chapters only in XHTML for JS player. ATOM feeds
|
|
|
|
copy chapters outside <content type="xhtml"/>
|
|
|
|
-->
|
|
|
|
<xsl:copy-of select="sc:chapters"
|
|
|
|
xmlns:sc="http://podlove.de/simple-chapters"/>
|
|
|
|
</xsl:if>
|
2011-10-28 21:46:40 +02:00
|
|
|
</li>
|
|
|
|
</xsl:template>
|
|
|
|
|
2011-10-29 03:36:22 +02:00
|
|
|
<xsl:template name="video-resource">
|
|
|
|
<section class="video-resource">
|
|
|
|
<h4>
|
2015-10-26 00:10:17 +01:00
|
|
|
<xsl:call-template name="auto-id"/>
|
2011-10-29 03:36:22 +02:00
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="@details-link">
|
|
|
|
<a href="{@details-link}">
|
|
|
|
<xsl:value-of select="@title"/>
|
|
|
|
</a>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="@title"/>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</h4>
|
|
|
|
<ul>
|
|
|
|
<xsl:call-template name="video-resource-item"/>
|
|
|
|
<xsl:apply-templates mode="video-resource"/>
|
|
|
|
|
|
|
|
<xsl:if test="@feedback-link">
|
|
|
|
<li class="feedback"><a href="{@feedback-link}">Feedback</a></li>
|
|
|
|
</xsl:if>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="resource/alternative" mode="video-resource">
|
|
|
|
<xsl:call-template name="video-resource-item">
|
|
|
|
<xsl:with-param name="title">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="@title"><xsl:value-of select="@title"/></xsl:when>
|
|
|
|
<xsl:otherwise><xsl:value-of select="../@title"/></xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="video-resource-item">
|
|
|
|
<xsl:variable name="href">
|
|
|
|
<xsl:call-template name="make-href">
|
|
|
|
<xsl:with-param name="href" select="@url"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<li class="{name(.)}">
|
|
|
|
<!-- HTML5 dataset hints for play-resources.js poster -->
|
|
|
|
<xsl:if test="@poster">
|
|
|
|
<xsl:attribute name="data-poster">
|
|
|
|
<xsl:value-of select="@poster"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@preview">
|
|
|
|
<xsl:attribute name="data-preview">
|
|
|
|
<xsl:value-of select="@preview"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<!-- MIME type hinting works even in the browser -->
|
|
|
|
<a href="{$href}" type="{@type}" class="mime" rel="enclosure">
|
|
|
|
<xsl:call-template name="mime-for-human-short">
|
|
|
|
<xsl:with-param name="mime" select="@type"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<span class="size">
|
|
|
|
<xsl:call-template name="format-filesize">
|
|
|
|
<xsl:with-param name="value" select="@size"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</span>
|
2013-12-20 02:26:27 +01:00
|
|
|
|
|
|
|
<xsl:if test="$baseurl = '' or $baseurl = '../'">
|
|
|
|
<!-- Include chapters only in XHTML for JS player. ATOM feeds
|
|
|
|
copy chapters outside <content type="xhtml"/>
|
|
|
|
-->
|
|
|
|
<xsl:copy-of select="sc:chapters"
|
|
|
|
xmlns:sc="http://podlove.de/simple-chapters"/>
|
|
|
|
</xsl:if>
|
2011-10-29 03:36:22 +02:00
|
|
|
</li>
|
|
|
|
</xsl:template>
|
2011-10-28 21:46:40 +02:00
|
|
|
|
|
|
|
<!-- Helpers -->
|
2007-03-14 01:18:05 +01:00
|
|
|
|
2015-10-26 00:10:17 +01:00
|
|
|
<xsl:template name="auto-id">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="@id">
|
|
|
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="@title">
|
|
|
|
<xsl:attribute name="id">
|
|
|
|
<xsl:call-template name="string-to-lower">
|
|
|
|
<xsl:with-param name="string" select="@title"/>
|
|
|
|
<xsl:with-param name="forspace">-</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:when>
|
|
|
|
</xsl:choose>
|
2015-06-19 02:21:07 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
2007-03-14 01:18:05 +01:00
|
|
|
<xsl:template name="format-filesize">
|
|
|
|
<xsl:param name="value"/>
|
|
|
|
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="$value > 1024 * 1024 * 1024">
|
2007-08-17 06:06:13 +02:00
|
|
|
<xsl:value-of select="format-number($value div (1024 * 1024 * 1024), '0.0')"/>
|
2007-03-14 01:18:05 +01:00
|
|
|
<xsl:text> GB</xsl:text>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="$value > 1024 * 1024">
|
2007-08-17 06:06:13 +02:00
|
|
|
<xsl:value-of select="format-number($value div (1024 * 1024), '0.0')"/>
|
2007-03-14 01:18:05 +01:00
|
|
|
<xsl:text> MB</xsl:text>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="$value > 1024">
|
2007-08-17 06:06:13 +02:00
|
|
|
<xsl:value-of select="format-number($value div (1024), '0.0')"/>
|
2007-03-14 01:18:05 +01:00
|
|
|
<xsl:text> KB</xsl:text>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="$value"/>
|
|
|
|
<xsl:text> Bytes</xsl:text>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
|
2007-04-10 03:36:48 +02:00
|
|
|
<xsl:template name="mime-for-human">
|
|
|
|
<xsl:param name="mime"/>
|
|
|
|
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="$mime = 'application/ogg'">Ogg Vorbis</xsl:when>
|
2011-11-13 17:41:45 +01:00
|
|
|
<xsl:when test="$mime = 'audio/ogg'">Ogg Vorbis</xsl:when>
|
2007-04-10 03:36:48 +02:00
|
|
|
<xsl:when test="$mime = 'audio/mpeg'">MPEG-Audio</xsl:when>
|
2014-01-05 23:57:57 +01:00
|
|
|
<xsl:when test="$mime = 'audio/mp4'">MPEG4-Audio</xsl:when>
|
2007-04-10 03:36:48 +02:00
|
|
|
<xsl:when test="$mime = 'application/octet-stream'">Binärdatei</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'application/xhtml+xml'">XHTML-Dokument</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'text/html'">HTML-Dokument</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'text/plain'">Text-Dokument</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'application/pdf'">Portable Document Format</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'image/svg+xml'">Scalable Vector Graphics</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'image/gif'">GIF-Bild</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'image/jpeg'">JPEG-Bild</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'image/png'">PNG-Bild</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'video/mpeg'">MPEG-Video</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'video/mp4'">MP4-Video</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'video/quicktime'">QuickTime-Video</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'video/x-ms-wmv'">Windows Media-Video</xsl:when>
|
2008-03-22 02:09:19 +01:00
|
|
|
<xsl:when test="$mime = 'video/x-msvideo'">Video for Windows</xsl:when>
|
2008-05-18 14:55:44 +02:00
|
|
|
<xsl:when test="$mime = 'video/avi'">Audio Video Interleave</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'video/ogg'">Ogg Media Video</xsl:when>
|
2009-09-23 01:17:55 +02:00
|
|
|
<xsl:when test="$mime = 'video/x-matroska'">Matroska Video</xsl:when>
|
2010-10-08 18:09:07 +02:00
|
|
|
<xsl:when test="$mime = 'video/x-m4v'">iTunes Video File</xsl:when>
|
2010-11-10 01:14:50 +01:00
|
|
|
<xsl:when test="$mime = 'video/webm'">WebM Video</xsl:when>
|
2010-11-15 02:43:08 +01:00
|
|
|
<xsl:when test="$mime = 'video/x-flv'">Flash Video</xsl:when>
|
2008-12-06 14:27:32 +01:00
|
|
|
<xsl:when test="$mime = 'application/x-gtar'">Komprimierter Tarball</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'application/x-tar'">Tarball</xsl:when>
|
2009-08-25 18:19:04 +02:00
|
|
|
<xsl:when test="$mime = 'application/x-bittorrent'">BitTorrent-Metainformationen</xsl:when>
|
2010-07-07 01:16:09 +02:00
|
|
|
<xsl:when test="$mime = 'application/zip'">ZIP-Archiv</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'multipart/x-zip'">ZIP-Archiv</xsl:when>
|
2012-10-24 17:09:47 +02:00
|
|
|
<xsl:when test="$mime = 'audio/opus'">Opus</xsl:when>
|
2007-04-10 03:36:48 +02:00
|
|
|
<xsl:otherwise>Datei</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
|
2011-10-29 03:36:22 +02:00
|
|
|
<xsl:template name="mime-for-human-short">
|
|
|
|
<xsl:param name="mime"/>
|
|
|
|
|
|
|
|
<xsl:choose>
|
2015-10-26 00:38:36 +01:00
|
|
|
<xsl:when test="$mime='audio/mpeg'">MP3</xsl:when>
|
|
|
|
<xsl:when test="$mime='video/mp4'">MP4</xsl:when>
|
|
|
|
<xsl:when test="$mime='audio/mp4'">M4A</xsl:when>
|
|
|
|
<xsl:when test="$mime='video/webm'">WebM</xsl:when>
|
|
|
|
<xsl:when test="$mime='video/ogg'">Ogg</xsl:when>
|
|
|
|
<xsl:when test="$mime='video/avi'">AVI</xsl:when>
|
|
|
|
<xsl:when test="$mime='video/x-flv'">FLV</xsl:when>
|
|
|
|
<xsl:when test="$mime = 'audio/opus'">Opus</xsl:when>
|
|
|
|
<xsl:when test="$mime='application/x-bittorrent'">BitTorrent</xsl:when>
|
|
|
|
<xsl:otherwise>Datei</xsl:otherwise>
|
2011-10-29 03:36:22 +02:00
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
|
2010-11-09 23:14:23 +01:00
|
|
|
<xsl:template name="normalize-path">
|
|
|
|
<xsl:param name="path"/>
|
|
|
|
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="contains($path, '/')">
|
|
|
|
<xsl:variable name="dir1" select="substring-before($path, '/')"/>
|
|
|
|
<xsl:variable name="dir2" select="substring-after($path, '/')"/>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="starts-with($dir2, '../')">
|
|
|
|
<!-- recurse with xxx/../ removed -->
|
|
|
|
<xsl:call-template name="normalize-path">
|
|
|
|
<xsl:with-param name="path">
|
|
|
|
<xsl:value-of select="substring-after($dir2, '../')"/>
|
|
|
|
</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<!-- spit out and recurse with tail -->
|
|
|
|
<xsl:value-of select="$dir1"/><xsl:text>/</xsl:text><xsl:call-template name="normalize-path">
|
|
|
|
<xsl:with-param name="path">
|
|
|
|
<xsl:value-of select="$dir2"/>
|
|
|
|
</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<!-- just a filename with no / -->
|
|
|
|
<xsl:value-of select="$path"/>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
|
2012-02-04 02:34:41 +01:00
|
|
|
<xsl:template name="make-flattr-link">
|
|
|
|
<xsl:param name="newsfile"/>
|
|
|
|
|
2012-04-28 02:39:47 +02:00
|
|
|
<xsl:if test="starts-with($newsfile, 'content/news/pentaradio24-') or
|
|
|
|
starts-with($newsfile, 'content/news/pentacast-') or
|
|
|
|
starts-with($newsfile, 'content/news/pentamusic-')">
|
|
|
|
<xsl:text>https://flattr.com/submit/auto?user_id=coloradio&url=</xsl:text>
|
2012-04-28 02:54:11 +02:00
|
|
|
<xsl:value-of select="str:encode-uri(concat($baseurl, substring-before(substring-after($newsfile, 'content/'), '.xml'), '.html'), true())"/>
|
2012-04-28 02:39:47 +02:00
|
|
|
<xsl:text>&title=</xsl:text>
|
|
|
|
<xsl:value-of select="str:encode-uri(document($newsfile)/item/@title, true())"/>
|
|
|
|
<xsl:text>&description=</xsl:text>
|
|
|
|
<xsl:value-of select="str:encode-uri(document($newsfile)//p[1], true())"/>
|
|
|
|
<xsl:text>&language=de&tags=audio,c3d2,podcast&category=audio</xsl:text>
|
|
|
|
</xsl:if>
|
2012-02-04 02:34:41 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2015-09-26 21:27:34 +02:00
|
|
|
<xsl:template name="string-to-lower">
|
|
|
|
<xsl:param name="string"/>
|
|
|
|
<xsl:param name="forspace"> </xsl:param>
|
|
|
|
<xsl:value-of select="translate($string, ' ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞŸŽŠŒ', concat($forspace,'abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿžšœ'))"/>
|
|
|
|
</xsl:template>
|
|
|
|
|
2006-01-06 19:51:03 +01:00
|
|
|
</xsl:stylesheet>
|