service.rss2.xsl 3.02 KB
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
	<xsl:output method="xml" encoding="utf-8"  indent="yes" />
	<xsl:template match="/">
		<rss version="2.0">
			<channel>
				<title><xsl:value-of select="content/BasisElement/Headline/Element"/></title>
				<link><xsl:variable name="main_link" select="concat('http://mensch.coop/',content/BasisElement/Headline/Element)"/><xsl:value-of select="php:functionString('XSLPHPFunction::getTextForRSS',$main_link)" disable-output-escaping="no"/></link>		
				<language>de-de</language>
				<lastBuildDate><xsl:value-of select="content/BasisElement/CreateDate"/></lastBuildDate>    			
				<copyright><xsl:value-of select="content/BasisElement/Author_NickName"/></copyright>
				<pubDate><xsl:value-of select="content/BasisElement/CreateDate"/></pubDate>
    			<generator>losp v.0.8</generator>
				<ttl>40</ttl>				
				<xsl:for-each select="content/BasisElement/BasisClipboard/List/BasisElement">
					<item>
						<title><xsl:value-of select="Headline/Element"/></title>
						<description><xsl:value-of select="php:functionString('XSLPHPFunction::getTextForRSS',Subheading/Element[@objvar='Text'])" disable-output-escaping="no"/></description>
						<pubDate>							 
							<xsl:variable name="var_date" select="CreateDate"/>
							<xsl:value-of select="substring($var_date,9,2)"/><xsl:text> </xsl:text>
							 <xsl:choose>
								<xsl:when test="substring($var_date,6,2) = '01'">Jan</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '02'">Feb</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '03'">Mar</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '04'">Apr</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '05'">May</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '06'">Jun</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '07'">Jul</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '08'">Aug</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '09'">Sep</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '10'">Oct</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '11'">Nov</xsl:when>
								<xsl:when test="substring($var_date,6,2) = '12'">Dec</xsl:when>
							</xsl:choose><xsl:text> </xsl:text>
							<xsl:value-of select="substring($var_date,1,4)"/><xsl:text> </xsl:text><xsl:value-of select="substring($var_date,12)"/><xsl:text> +0100</xsl:text>
						</pubDate>
						<author><xsl:value-of select="Author_NickName"/>, E-Mail-Adresse</author>
						<guid><xsl:value-of select="@ID"/></guid>
						<link><xsl:variable name="link"><xsl:value-of select="concat(Link/@host,'/',Link/@url,'?')"/><xsl:value-of select="Link/@parameter" /></xsl:variable><xsl:value-of select="php:functionString('XSLPHPFunction::getTextForRSS',$link)" disable-output-escaping="no"/></link>
						<source url="http://domain.tld/rss.xml">http://domain.tld</source>
					</item>
				</xsl:for-each>
			</channel>
		</rss>
	</xsl:template>
</xsl:stylesheet>