service.iCalendar.xsl 1.39 KB
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:php="http://php.net/xsl" >

<xsl:template match="/">
ICS_VALUE
<xsl:value-of select="content/BasisElement/BasisClipboard[@BasisClipboard='DateBC']/List/@start"/>
ICS_VALUE
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
END:VTIMEZONE
<xsl:for-each select="content/BasisElement/BasisClipboard[@BasisClipboard='DateBC']/Calendar/Entrys/Entry">BEGIN:VEVENT<xsl:variable name="var_start" select="@start"/><xsl:variable name="var_end" select="@end"/><xsl:variable name="var_id" select="@be_id"/><xsl:variable name="var_headline" select="php:functionString('XSLPHPFunction::getTextForService',concat('SUMMARY:',../../../List/BasisElement[@ID = $var_id]/Headline/Element[@objvar='Subject']))"/><xsl:variable name="var_text" select="php:functionString('XSLPHPFunction::getTextForService',../../../List/BasisElement[@ID = $var_id]/Element[@objvar='Text'])"/><xsl:value-of select="$var_headline" disable-output-escaping="yes"/>DTSTART:<xsl:value-of select="php:functionString('XSLPHPFunction::getStampToIcal', $var_start)" />
<xsl:value-of select="concat('DESCRIPTION:',$var_text)" disable-output-escaping="yes"/>DTEND:<xsl:if test="$var_start != $var_end"><xsl:value-of select="php:functionString('XSLPHPFunction::getStampToIcal', $var_end)" /></xsl:if>
END:VEVENT
</xsl:for-each>END:VCALENDAR
</xsl:template>
</xsl:stylesheet>