Konfiguration: xfeedconfig_teaser_av

all,page
embed.pagexml
all
xslt
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cq="http://www.day.com/jcr/cq/1.0" exclude-result-prefixes="cq" version="1.0"> <xsl:output encoding="UTF-8" indent="yes" method="xml"/> <xsl:template name="removeHtmlTags"> <xsl:param name="html"/> <xsl:choose> <xsl:when test="contains($html, '&lt;')"> <xsl:value-of select="substring-before($html, '&lt;')"/> <!-- Recurse through HTML --> <xsl:call-template name="removeHtmlTags"> <xsl:with-param name="html" select="substring-after($html, '&gt;')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$html"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="replace"> <xsl:param name="string"/> <xsl:param name="from"/> <xsl:param name="to"/> <xsl:choose> <xsl:when test="contains($string, $from)"> <xsl:value-of select="substring-before($string, $from)"/> <xsl:copy-of select="$to"/> <xsl:call-template name="replace"> <xsl:with-param name="string" select="substring-after($string, $from)"/> <xsl:with-param name="from" select="$from"/> <xsl:with-param name="to" select="$to"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="FormatGeo"> <xsl:param name="geo"/> <xsl:variable name="lat" select="substring-before($geo,',')"/> <xsl:variable name="long" select="substring-after($geo,',')"/> <xsl:if test="$lat"> <geolat> <xsl:value-of select="$lat"/> </geolat> <geolong> <xsl:value-of select="$long"/> </geolong> </xsl:if> </xsl:template> <xsl:template name="FindMO"> <xsl:param name="MOHandle"/> <xsl:for-each select="/xfeed/teaserboxlist[@name='middle']/teaserbox"> <xsl:variable name="box" select="boxheadline"/> <xsl:if test="$box = 'Medienobjekte'"> <xsl:for-each select="teaserlist/teaser"> <xsl:variable name="handle" select="@handle"/> <xsl:if test="$handle = $MOHandle"> <xsl:for-each select="image/variants/variant"> <xsl:variable name="url_compr" select="url"/> <xsl:variable name="img_alt" select="../../alttext"/> <image> <xsl:attribute name="width"> <xsl:value-of select="width"/> </xsl:attribute> <xsl:attribute name="height"> <xsl:value-of select="height"/> </xsl:attribute> <xsl:attribute name="alt"> <xsl:value-of select="$img_alt"/> </xsl:attribute> <xsl:value-of select="$url_compr"/> </image> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:template> <xsl:template match="/"> <xsl:comment> * cq5 - Medienobjekte - Teaser mit Titel, Dachzeile, Kurztext, Bild, Audio direkt, kompatibel für absolute URLs - 31.7.2015, ls007 * AV https - 8.6.2017, ls007 * xfeed_mobil_teaser_av_kulturradio.xsl </xsl:comment> <xsl:apply-templates/> </xsl:template> <xsl:template match="xfeed"> <channel> <title> <xsl:value-of select="titletext"/> </title> <link> <xsl:value-of select="pagelink"/> </link> <description> <xsl:value-of select="shorttext"/> </description> <xsl:apply-templates/> </channel> </xsl:template> <xsl:template match="teaserboxlist[@name='middle']"> <xsl:for-each select="teaserbox"> <xsl:variable name="box" select="boxheadline"/> <xsl:if test="$box = 'Medienobjekte'"> <xsl:apply-templates/> </xsl:if> </xsl:for-each> </xsl:template> <xsl:template match="teaserlist"> <xsl:apply-templates/> </xsl:template> <xsl:template match="teaser"> <xsl:variable name="handle" select="@handle"/> <xsl:variable name="doctype" select="@doctype"/> <xsl:variable name="title" select="title"/> <xsl:variable name="httpStream" select="'https://rbbhttpstream-a.akamaihd.net/'"/> <xsl:variable name="httpDownload" select="'https://rbbmedia-a.akamaihd.net/'"/> <xsl:variable name="httpOnDemand" select="'http://media-stream-pmd.rbb-online.de/'"/> <xsl:variable name="httpAdaptive" select="'http://media-adaptive.rbb-online.de/'"/> <xsl:variable name="httpsOnDemand" select="'https://rbbmediapmdp-a.akamaihd.net/'"/> <xsl:variable name="httpsAdaptive" select="'https://rbbmediaadp-vh.akamaihd.net/'"/> <xsl:variable name="StreamUrl"> <xsl:for-each select="page/containerlist[@name='formatVariants']/par"> <xsl:variable name="type" select="formatVariantFileType"/> <xsl:if test="contains($type, 'mp3_m_stream')"> <xsl:variable name="url" select="formatVariantURL"/> <xsl:variable name="avUriTemp"> <xsl:call-template name="replace"> <xsl:with-param name="string" select="formatVariantURL"/> <xsl:with-param name="from" select="$httpOnDemand"/> <xsl:with-param name="to" select="$httpsOnDemand"/> </xsl:call-template> </xsl:variable> <xsl:variable name="avUri"> <xsl:call-template name="replace"> <xsl:with-param name="string" select="$avUriTemp"/> <xsl:with-param name="from" select="$httpAdaptive"/> <xsl:with-param name="to" select="$httpsAdaptive"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="contains($avUri, 'http')" /> <xsl:otherwise> <xsl:value-of select="$httpStream"/> </xsl:otherwise> </xsl:choose> <xsl:value-of select="$avUri"/> </xsl:if> </xsl:for-each> </xsl:variable> <item> <tablink><xsl:value-of select="$doctype"/>s</tablink> <lastmodify> <xsl:value-of select="page/cq:lastModified"/> </lastmodify> <audio> <xsl:value-of select="$StreamUrl"/> </audio> <dachzeile> <xsl:value-of select="roofline"/> </dachzeile> <title> <xsl:value-of select="title"/> </title> <date> <xsl:value-of select="page/dateTime"/> </date> <offdate> <xsl:value-of select="page/archiveDate"/> </offdate> <link> <xsl:value-of select="teaserlink"/> </link> <xsl:variable name="linebreak"><xsl:text>&#xA;</xsl:text></xsl:variable> <xsl:variable name="questionmark"><xsl:text>"</xsl:text></xsl:variable> <xsl:variable name="shorttext" select="shorttext" /> <xsl:variable name="shorttext0"> <xsl:call-template name="replace"> <xsl:with-param name="string" select="$shorttext"/> <xsl:with-param name="from" select="'&lt;/p&gt;&lt;p&gt;'"/> <xsl:with-param name="to" select="' '"/> </xsl:call-template> </xsl:variable> <xsl:variable name="shorttext1"> <xsl:call-template name="replace"> <xsl:with-param name="string" select="$shorttext0"/> <xsl:with-param name="from" select="'&lt;br&gt;'"/> <xsl:with-param name="to" select="' '"/> </xsl:call-template> </xsl:variable> <xsl:variable name="shorttext2"> <xsl:call-template name="replace"> <xsl:with-param name="string" select="$shorttext1"/> <xsl:with-param name="from" select="'&amp;nbsp;'"/> <xsl:with-param name="to" select="' '"/> </xsl:call-template> </xsl:variable> <xsl:variable name="shorttext3"> <xsl:call-template name="replace"> <xsl:with-param name="string" select="$shorttext2"/> <xsl:with-param name="from" select="'&amp;quot;'"/> <xsl:with-param name="to" select="$questionmark"/> </xsl:call-template> </xsl:variable> <text> <xsl:call-template name="removeHtmlTags"> <xsl:with-param name="html" select="$shorttext3" /> </xsl:call-template> </text> <xsl:if test="image"> <xsl:for-each select="image/variants/variant"> <xsl:variable name="url_compr" select="url"/> <xsl:variable name="img_alt" select="../../alttext"/> <xsl:variable name="img_source" select="../../source"/> <image> <xsl:attribute name="width"> <xsl:value-of select="width"/> </xsl:attribute> <xsl:attribute name="height"> <xsl:value-of select="height"/> </xsl:attribute> <xsl:attribute name="alt"> <xsl:value-of select="$img_alt"/> </xsl:attribute> <xsl:attribute name="source"> <xsl:value-of select="$img_source"/> </xsl:attribute> <xsl:value-of select="$url_compr"/> </image> </xsl:for-each> </xsl:if> </item> </xsl:template> <xsl:template match="*"/> </xsl:stylesheet>
element.lastmodify.xpath
/xfeed/page
element.lastmodify.value
$atom:cq:lastModified
element.lastmodify.outputformat
SIMPLE_DATE(EEE, d MMM yyyy HH:mm:ss z)
element.webMaster.xpath
/xfeed
element.webMaster.value
$atom:siteconfig_feed_web_master
teaserimage.size
1250x703,960x540,640x360,512x288,460x259
topimage.size
1250x703,640x360,460x259
teaserimage.quality
196
topimage.quality
196