|
|
|
@ -112,96 +112,25 @@
|
|
|
|
|
</html>
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
<!-- Parse XHTML schedule generated by Pentabarf[tm] -->
|
|
|
|
|
<!-- Parse HTML schedule generated by Frab[tm] -->
|
|
|
|
|
|
|
|
|
|
<!-- Da ich hier nicht lange frickeln wollte, wird xhtml nochmal als
|
|
|
|
|
extra NS behandelt, also jegliche Elemente in XPath mit xhtml:
|
|
|
|
|
prefixen
|
|
|
|
|
|
|
|
|
|
Weiterhin ist Pentabarf-Output XHTML und kein schicker XML-Dialekt.
|
|
|
|
|
Dafür haben wir da drin aber schon eine schicke Tabellenstruktur. Für
|
|
|
|
|
die <td/>s usw. extra Templates anzulegen war mir zu unsauber, deshalb
|
|
|
|
|
wird hier überall manuell durchiteriert.
|
|
|
|
|
|
|
|
|
|
Vorgehensweise klar? -~~~~ -->
|
|
|
|
|
<xsl:template match="include-pentabarf-schedule" xmlns:x="http://www.w3.org/1999/xhtml">
|
|
|
|
|
<xsl:param name="prefix" select="@prefix"/>
|
|
|
|
|
|
|
|
|
|
<xsl:for-each select="document(@src)//x:div[@id='schedule']">
|
|
|
|
|
<xsl:template match="include-frab-schedule">
|
|
|
|
|
<xsl:variable name="title" select="@title"/>
|
|
|
|
|
<xsl:for-each select="document(@src)/day">
|
|
|
|
|
<h2 class="scheduletitle">
|
|
|
|
|
<xsl:value-of select="x:h1"/>
|
|
|
|
|
<xsl:choose>
|
|
|
|
|
<xsl:when test="$title">
|
|
|
|
|
<xsl:value-of select="$title"/>
|
|
|
|
|
</xsl:when>
|
|
|
|
|
<xsl:otherwise>
|
|
|
|
|
<xsl:value-of select="@title"/>
|
|
|
|
|
</xsl:otherwise>
|
|
|
|
|
</xsl:choose>
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
<table class="schedule">
|
|
|
|
|
<tr>
|
|
|
|
|
<xsl:for-each select="x:table/x:thead/x:tr/x:th">
|
|
|
|
|
<th>
|
|
|
|
|
<xsl:if test="x:strong">
|
|
|
|
|
<xsl:attribute name="class">schedulehead</xsl:attribute>
|
|
|
|
|
<xsl:value-of select="x:strong"/>
|
|
|
|
|
</xsl:if>
|
|
|
|
|
</th>
|
|
|
|
|
</xsl:for-each>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<xsl:for-each select="x:table/x:tbody/x:tr">
|
|
|
|
|
<tr>
|
|
|
|
|
<xsl:for-each select="x:td">
|
|
|
|
|
<xsl:if test="@class">
|
|
|
|
|
<td>
|
|
|
|
|
<xsl:if test="normalize-space(@rowspan) != ''">
|
|
|
|
|
<xsl:attribute name="rowspan">
|
|
|
|
|
<xsl:value-of select="@rowspan"/>
|
|
|
|
|
</xsl:attribute>
|
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
|
|
<xsl:choose>
|
|
|
|
|
<xsl:when test='count(x:*)=0'>
|
|
|
|
|
<!-- Zeit oder leer -->
|
|
|
|
|
<xsl:variable name="time"
|
|
|
|
|
select="normalize-space(.)"/>
|
|
|
|
|
|
|
|
|
|
<xsl:attribute name="class">
|
|
|
|
|
<xsl:text>timeslot</xsl:text>
|
|
|
|
|
<xsl:choose>
|
|
|
|
|
<xsl:when test="substring($time, string-length($time)) = '0'">
|
|
|
|
|
<xsl:text> even</xsl:text>
|
|
|
|
|
</xsl:when>
|
|
|
|
|
<xsl:when test="substring($time, string-length($time)) = '5'">
|
|
|
|
|
<xsl:text> odd</xsl:text>
|
|
|
|
|
</xsl:when>
|
|
|
|
|
</xsl:choose>
|
|
|
|
|
</xsl:attribute>
|
|
|
|
|
|
|
|
|
|
<xsl:value-of select="$time"/>
|
|
|
|
|
</xsl:when>
|
|
|
|
|
<xsl:otherwise>
|
|
|
|
|
<!-- Event -->
|
|
|
|
|
<xsl:attribute name="class">event</xsl:attribute>
|
|
|
|
|
<h4>
|
|
|
|
|
<a class="event" href="{$prefix}{x:p[@class='title']/x:a/@href}">
|
|
|
|
|
<xsl:value-of select="x:p[@class='title']"/>
|
|
|
|
|
</a>
|
|
|
|
|
</h4>
|
|
|
|
|
<xsl:if test="x:ul[@class='speakers']/x:li/x:a">
|
|
|
|
|
<ul>
|
|
|
|
|
<xsl:for-each select="x:ul[@class='speakers']/x:li/x:a">
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{$prefix}{@href}">
|
|
|
|
|
<xsl:value-of select="."/>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
</xsl:for-each>
|
|
|
|
|
</ul>
|
|
|
|
|
</xsl:if>
|
|
|
|
|
</xsl:otherwise>
|
|
|
|
|
</xsl:choose>
|
|
|
|
|
</td>
|
|
|
|
|
</xsl:if>
|
|
|
|
|
</xsl:for-each>
|
|
|
|
|
</tr>
|
|
|
|
|
</xsl:for-each>
|
|
|
|
|
|
|
|
|
|
<xsl:copy-of select="table/thead"/>
|
|
|
|
|
<xsl:copy-of select="table/tbody"/>
|
|
|
|
|
</table>
|
|
|
|
|
</xsl:for-each>
|
|
|
|
|
</xsl:template>
|
|
|
|
|