2006-10-28 20:33:31 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
xmlns:date="http://exslt.org/dates-and-times"
|
|
|
|
exclude-result-prefixes="xsl date">
|
|
|
|
|
|
|
|
<xsl:output method="xml"
|
|
|
|
version="1.0"
|
|
|
|
encoding="utf-8"
|
|
|
|
doctype-system="http://www.c3d2.de/dtd/c3d2web.dtd"
|
|
|
|
indent="yes"/>
|
|
|
|
|
|
|
|
<xsl:template match="/calendar">
|
|
|
|
<page>
|
|
|
|
<calendar-summary>
|
|
|
|
<!-- Events aus events.xml ziehen -->
|
|
|
|
<xsl:apply-templates select="event"/>
|
|
|
|
|
|
|
|
<!-- Events aus den News ziehen -->
|
|
|
|
<xsl:for-each select="document('../news.xml')/page/news/newsfile">
|
2006-10-29 12:50:59 +01:00
|
|
|
<xsl:apply-templates select="document(concat('../', .))/item/event">
|
2006-12-06 00:21:31 +01:00
|
|
|
<xsl:with-param name="link" select="concat(substring-before(substring-after(., 'content/'), '.xml'), '.html')"/>
|
2006-10-29 12:50:59 +01:00
|
|
|
</xsl:apply-templates>
|
2006-10-28 20:33:31 +02:00
|
|
|
</xsl:for-each>
|
|
|
|
</calendar-summary>
|
|
|
|
</page>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="event">
|
2006-10-29 12:50:59 +01:00
|
|
|
<xsl:param name="link"/>
|
|
|
|
|
2006-10-28 20:33:31 +02:00
|
|
|
<event>
|
|
|
|
<title>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="@title"><xsl:value-of select="@title"/></xsl:when>
|
|
|
|
<xsl:when test="../@title"><xsl:value-of select="../@title"/></xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:message terminate="yes">Event with no title!</xsl:message>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</title>
|
2006-11-10 00:41:41 +01:00
|
|
|
<start><xsl:value-of select="start"/></start>
|
|
|
|
<end>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="end">
|
|
|
|
<xsl:value-of select="end"/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="start"/>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</end>
|
2006-10-28 20:43:50 +02:00
|
|
|
<location><xsl:value-of select="location"/></location>
|
2006-10-29 12:50:59 +01:00
|
|
|
<link>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="link"><xsl:value-of select="link"/></xsl:when>
|
|
|
|
<xsl:otherwise><xsl:value-of select="$link"/></xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</link>
|
2006-10-28 20:33:31 +02:00
|
|
|
<!-- TODO: Link -->
|
|
|
|
</event>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|