586 lines
18 KiB
XML
586 lines
18 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<xsl:stylesheet version="1.0"
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
xmlns:rss="http://purl.org/rss/1.0/"
|
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
xmlns:date="http://exslt.org/dates-and-times"
|
|
xmlns:str="http://exslt.org/strings"
|
|
exclude-result-prefixes="xsl rss rdf date str">
|
|
|
|
<xsl:template match="pre">
|
|
<pre><xsl:apply-templates/></pre>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="p">
|
|
<xsl:if test="@title">
|
|
<h3>
|
|
<xsl:value-of select="@title"/>
|
|
</h3>
|
|
</xsl:if>
|
|
<p class="{@class}">
|
|
<xsl:apply-templates/>
|
|
</p>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="dl">
|
|
<dl class="{@class}">
|
|
<xsl:apply-templates/>
|
|
</dl>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="dh">
|
|
<dt class="main"><xsl:apply-templates/></dt>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="dt">
|
|
<dt><xsl:apply-templates/></dt>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="dd">
|
|
<dd><xsl:apply-templates/></dd>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="ul">
|
|
<ul><xsl:apply-templates/></ul>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="ol">
|
|
<ol><xsl:apply-templates/></ol>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="li">
|
|
<li><xsl:apply-templates/></li>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="image">
|
|
<xsl:variable name="path">
|
|
<xsl:call-template name="normalize-path">
|
|
<xsl:with-param name="path">
|
|
<xsl:value-of select="string(.)"/>
|
|
</xsl:with-param>
|
|
</xsl:call-template>
|
|
</xsl:variable>
|
|
|
|
<img
|
|
src="{$path}"
|
|
title="{@title}"
|
|
alt="{@title}"
|
|
class="{@class}"/>
|
|
</xsl:template>
|
|
|
|
<!-- Bilder in News-Einträgen haben Pfad immer relativ zu /images/news/ -->
|
|
<xsl:template match="item/image">
|
|
<xsl:variable name="path">
|
|
<xsl:call-template name="normalize-path">
|
|
<xsl:with-param name="path">
|
|
<xsl:choose>
|
|
<xsl:when test="contains(., '://')">
|
|
<xsl:value-of select="."/>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:value-of select="concat($baseurl, 'images/news/', .)"/>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:with-param>
|
|
</xsl:call-template>
|
|
</xsl:variable>
|
|
|
|
<img
|
|
src="{$path}"
|
|
title="{@title}"
|
|
alt="{@title}"
|
|
class="{@class}"/>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="link">
|
|
<xsl:variable name="href">
|
|
<xsl:call-template name="make-href">
|
|
<xsl:with-param name="href" select="@href"/>
|
|
</xsl:call-template>
|
|
</xsl:variable>
|
|
|
|
<a href="{$href}">
|
|
<xsl:if test="@class">
|
|
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
|
|
</xsl:if>
|
|
|
|
<xsl:apply-templates/>
|
|
</a>
|
|
</xsl:template>
|
|
|
|
<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>
|
|
|
|
<xsl:template match="em">
|
|
<em>
|
|
<xsl:apply-templates/>
|
|
</em>
|
|
</xsl:template>
|
|
<xsl:template match="strong">
|
|
<strong>
|
|
<xsl:apply-templates/>
|
|
</strong>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="xhtml:*"
|
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
<xsl:copy-of select="."/>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="navitem">
|
|
<xsl:param name="file"/>
|
|
<xsl:param name="baseurl"/>
|
|
<xsl:param name="title"/>
|
|
<li>
|
|
<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>
|
|
</li>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="navitems">
|
|
<ul>
|
|
<xsl:for-each select="document('../content/navigation.xml')/navigation/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:template>
|
|
|
|
<!-- Adspace -->
|
|
|
|
<xsl:template name="adspace">
|
|
<div id="adspace">
|
|
<p>
|
|
<a href="http://pentamedia.org/">
|
|
<img title="pentamedia.org"
|
|
alt="pentamedia"
|
|
src="{concat($baseurl, 'images/pentamedia.png')}"
|
|
border="0"/>
|
|
</a>
|
|
</p>
|
|
<h2><a href="http://pentamedia.org/">Podcasts</a></h2>
|
|
</div>
|
|
</xsl:template>
|
|
|
|
<!-- Chaosupdates in sidebar -->
|
|
|
|
<xsl:template name="chaosupdates">
|
|
<xsl:param name="limit" select="5"/>
|
|
<div id="news">
|
|
<h2>
|
|
<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>
|
|
</h2>
|
|
<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>
|
|
</div> <!-- id="news" -->
|
|
</xsl:template>
|
|
|
|
<!-- Calendar in sidebar -->
|
|
|
|
<xsl:template name="calendar-events">
|
|
<xsl:param name="limit" select="5"/>
|
|
<xsl:if test="document('../calendar-summary.xml')/page/calendar-summary/event[date:seconds(end) >= date:seconds(date:date())]">
|
|
<div id="upcoming">
|
|
<h2>
|
|
<a href="{$baseurl}calendar.html">Kalender</a>
|
|
</h2>
|
|
<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>
|
|
<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>
|
|
<xsl:if test="string-length(location) > 0">
|
|
<xsl:attribute name="title">
|
|
<xsl:value-of select="concat('Ort: ', location)"/>
|
|
</xsl:attribute>
|
|
</xsl:if>
|
|
<xsl:value-of select="title"/>
|
|
</a>
|
|
</li>
|
|
</xsl:if>
|
|
</xsl:for-each>
|
|
</ul>
|
|
</div>
|
|
</xsl:if>
|
|
</xsl:template>
|
|
|
|
<!-- Support für <event/> bzw. Microformats -->
|
|
<xsl:include href="date.xsl" />
|
|
<xsl:template match="item/event">
|
|
<dl>
|
|
<xsl:apply-templates/>
|
|
</dl>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="item/event/start">
|
|
<xsl:variable name="start" select="."/>
|
|
<xsl:variable name="end" select="../end"/>
|
|
|
|
<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">
|
|
<xsl:with-param name="date" select="$end"/>
|
|
</xsl:call-template>
|
|
</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>
|
|
</xsl:template>
|
|
<xsl:template match="item/event/end">
|
|
<!-- Output already for item/event/start above -->
|
|
</xsl:template>
|
|
<xsl:template match="item/event/location">
|
|
<dt>Ort</dt>
|
|
<dd class="location"><xsl:apply-templates/></dd>
|
|
</xsl:template>
|
|
|
|
<!-- Resources/alternatives in HTML -->
|
|
|
|
<xsl:template match="resource">
|
|
<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>
|
|
</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>
|
|
|
|
(<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>)
|
|
</li>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="video-resource">
|
|
<section class="video-resource">
|
|
<h4>
|
|
<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>
|
|
</li>
|
|
</xsl:template>
|
|
|
|
<!-- Helpers -->
|
|
|
|
<xsl:template name="format-filesize">
|
|
<xsl:param name="value"/>
|
|
|
|
<xsl:choose>
|
|
<xsl:when test="$value > 1024 * 1024 * 1024">
|
|
<xsl:value-of select="format-number($value div (1024 * 1024 * 1024), '0.0')"/>
|
|
<xsl:text> GB</xsl:text>
|
|
</xsl:when>
|
|
<xsl:when test="$value > 1024 * 1024">
|
|
<xsl:value-of select="format-number($value div (1024 * 1024), '0.0')"/>
|
|
<xsl:text> MB</xsl:text>
|
|
</xsl:when>
|
|
<xsl:when test="$value > 1024">
|
|
<xsl:value-of select="format-number($value div (1024), '0.0')"/>
|
|
<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>
|
|
|
|
<xsl:template name="mime-for-human">
|
|
<xsl:param name="mime"/>
|
|
|
|
<xsl:choose>
|
|
<xsl:when test="$mime = 'application/ogg'">Ogg Vorbis</xsl:when>
|
|
<xsl:when test="$mime = 'audio/ogg'">Ogg Vorbis</xsl:when>
|
|
<xsl:when test="$mime = 'audio/mpeg'">MPEG-Audio</xsl:when>
|
|
<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>
|
|
<xsl:when test="$mime = 'video/x-msvideo'">Video for Windows</xsl:when>
|
|
<xsl:when test="$mime = 'video/avi'">Audio Video Interleave</xsl:when>
|
|
<xsl:when test="$mime = 'video/ogg'">Ogg Media Video</xsl:when>
|
|
<xsl:when test="$mime = 'video/x-matroska'">Matroska Video</xsl:when>
|
|
<xsl:when test="$mime = 'video/x-m4v'">iTunes Video File</xsl:when>
|
|
<xsl:when test="$mime = 'video/webm'">WebM Video</xsl:when>
|
|
<xsl:when test="$mime = 'video/x-flv'">Flash Video</xsl:when>
|
|
<xsl:when test="$mime = 'application/x-gtar'">Komprimierter Tarball</xsl:when>
|
|
<xsl:when test="$mime = 'application/x-tar'">Tarball</xsl:when>
|
|
<xsl:when test="$mime = 'application/x-bittorrent'">BitTorrent-Metainformationen</xsl:when>
|
|
<xsl:when test="$mime = 'application/zip'">ZIP-Archiv</xsl:when>
|
|
<xsl:when test="$mime = 'multipart/x-zip'">ZIP-Archiv</xsl:when>
|
|
<xsl:otherwise>Datei</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="mime-for-human-short">
|
|
<xsl:param name="mime"/>
|
|
|
|
<xsl:choose>
|
|
<xsl:when test="@type='video/mp4'">MP4</xsl:when>
|
|
<xsl:when test="@type='video/webm'">WebM</xsl:when>
|
|
<xsl:when test="@type='video/ogg'">Ogg</xsl:when>
|
|
<xsl:when test="@type='video/avi'">AVI</xsl:when>
|
|
<xsl:when test="@type='video/x-flv'">FLV</xsl:when>
|
|
<xsl:when test="@type='application/x-bittorrent'">BitTorrent</xsl:when>
|
|
<xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
<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>
|
|
|
|
<xsl:template name="make-flattr-link">
|
|
<xsl:param name="newsfile"/>
|
|
|
|
<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>
|
|
<xsl:value-of select="str:encode-uri(concat($baseurl, substring-before(substring-after($newsfile, 'content/'), '.xml'), '.html'), true())"/>
|
|
<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>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|