datenspuren frab fahrplan integration
This commit is contained in:
parent
261d75d3aa
commit
5b2ed84d57
12
Makefile
12
Makefile
|
@ -44,7 +44,7 @@ WWW_CCC_DE_UPDATES=chaosupdates.xml
|
|||
# Calendar summary::
|
||||
CALENDAR_SUMMARY=calendar-summary.xml
|
||||
# Datenspuren Fahrplan
|
||||
DS_SCHEDULE=$(wildcard content/static/datenspuren/$(DS_YEAR)/fahrplan/day_*.html)
|
||||
DS_SCHEDULE=$(patsubst content/static/datenspuren/$(DS_YEAR)/fahrplan/schedule/%.html, build/datenspuren/$(DS_YEAR)/schedule-%.xml, $(wildcard content/static/datenspuren/$(DS_YEAR)/fahrplan/schedule/?.html))
|
||||
|
||||
### Ziele ###
|
||||
# Mindestens 1x täglich neubauen wegen Chaosupdates & Kalender
|
||||
|
@ -222,12 +222,18 @@ build/news/%.html : BASEURL="../"
|
|||
build/news/%.html: content/news/%.xml $(STYLE) $(NAVIGATION) $(WWW_CCC_DE_UPDATES) $(CALENDAR_SUMMARY) $(DATESTAMP)
|
||||
$(call xml_process)
|
||||
|
||||
# Datenspuren
|
||||
|
||||
build/datenspuren/$(DS_YEAR)/schedule-%.xml : VFLAGS_IN=$(VFLAGS) --html
|
||||
build/datenspuren/$(DS_YEAR)/schedule-%.xml : PFLAGS+=--html
|
||||
build/datenspuren/$(DS_YEAR)/schedule-%.xml : STYLE=xsl/datenspuren/frab2xml.xsl
|
||||
build/datenspuren/$(DS_YEAR)/schedule-%.xml: content/static/datenspuren/$(DS_YEAR)/fahrplan/schedule/%.html $(STYLE)
|
||||
$(call xml_process)
|
||||
|
||||
build/datenspuren/$(DS_YEAR)/%html : STYLE=$(DS_STYLE)
|
||||
build/datenspuren/$(DS_YEAR)/%.html: content/datenspuren/%.xml $(DS_STYLE) news.xml $(DS_SCHEDULE)
|
||||
$(call xml_process)
|
||||
|
||||
build/datenspuren/$(DS_YEAR)/schedule.html : content/static/datenspuren/$(DS_YEAR)/fahrplan/index.de.html
|
||||
|
||||
build/datenspuren/$(DS_YEAR)/news-rss.xml : STYLE=xsl/rss.xsl
|
||||
build/datenspuren/$(DS_YEAR)/news-rss.xml : NOVALID:=true
|
||||
build/datenspuren/$(DS_YEAR)/news-rss.xml : PFLAGS+=--stringparam prefix ds13-
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<!DOCTYPE page SYSTEM "http://www.c3d2.de/dtd/c3d2web.dtd">
|
||||
|
||||
<page title="Fahrplan/Programm">
|
||||
<p>Wird hier erscheinen.</p>
|
||||
<!--include-pentabarf-schedule src="../static/datenspuren/2012/fahrplan/day_2012-10-13.de.html" prefix="fahrplan/"/>
|
||||
<include-pentabarf-schedule src="../static/datenspuren/2012/fahrplan/day_2012-10-14.de.html" prefix="fahrplan/"/-->
|
||||
<include-frab-schedule src="../../build/datenspuren/2013/schedule-0.xml"
|
||||
title="Sonnabend, 7. September"/>
|
||||
<include-frab-schedule src="../../build/datenspuren/2013/schedule-1.xml"
|
||||
title="Sonntag, 8. September"/>
|
||||
</page>
|
||||
|
|
|
@ -459,3 +459,129 @@ footer a:hover, aside a:hover {
|
|||
top: 64px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Fahrplan */
|
||||
|
||||
|
||||
.schedule {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.schedule th, .schedule td {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: rgba(0.5, 0.5, 0.5, 0.2);
|
||||
vertical-align: top;
|
||||
margin: 0;
|
||||
padding: 0px 0.4em;
|
||||
}
|
||||
.schedule h2 {
|
||||
font-size: 100%;
|
||||
}
|
||||
.schedule .cell-time p {
|
||||
color: #f3f3f3;
|
||||
font-weight: normal;
|
||||
}
|
||||
.schedule .event-wrapper {
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
||||
.schedule .cell-height1 {
|
||||
height: 40px;
|
||||
}
|
||||
.schedule .cell-height2 {
|
||||
height: 77px;
|
||||
}
|
||||
.schedule .cell-height3 {
|
||||
height: 117px;
|
||||
}
|
||||
.schedule .cell-height4 {
|
||||
height: 157px;
|
||||
}
|
||||
.schedule .cell-height5 {
|
||||
height: 197px;
|
||||
}
|
||||
.schedule .cell-height6 {
|
||||
height: 237px;
|
||||
}
|
||||
.schedule .cell-height7 {
|
||||
height: 277px;
|
||||
}
|
||||
.schedule .cell-height8 {
|
||||
height: 317px;
|
||||
}
|
||||
.schedule .cell-height9 {
|
||||
height: 357px;
|
||||
}
|
||||
.schedule .cell-height10 {
|
||||
height: 397px;
|
||||
}
|
||||
.schedule .cell-height11 {
|
||||
height: 437px;
|
||||
}
|
||||
.schedule .cell-height12 {
|
||||
height: 477px;
|
||||
}
|
||||
.schedule .cell-height13 {
|
||||
height: 517px;
|
||||
}
|
||||
.schedule .cell-height14 {
|
||||
height: 557px;
|
||||
}
|
||||
.schedule .cell-height15 {
|
||||
height: 597px;
|
||||
}
|
||||
.schedule .cell-height16 {
|
||||
height: 637px;
|
||||
}
|
||||
.schedule .cell-height17 {
|
||||
height: 677px;
|
||||
}
|
||||
.schedule .cell-height18 {
|
||||
height: 717px;
|
||||
}
|
||||
.schedule .cell-height19 {
|
||||
height: 757px;
|
||||
}
|
||||
.schedule .cell-height20 {
|
||||
height: 797px;
|
||||
}
|
||||
|
||||
.schedule .event.track-default {
|
||||
border-color: #156dd0;
|
||||
}
|
||||
.schedule .event.track-default div.event-header {
|
||||
}
|
||||
.schedule .event.track-default div.event-header a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.schedule .event.track-gesellschaft {
|
||||
border-color: #156dd0;
|
||||
}
|
||||
.schedule .event.track-gesellschaft div.event-header {
|
||||
}
|
||||
.schedule .event.track-gesellschaft div.event-header a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.schedule .event.track-junghacker {
|
||||
border-color: #156dd0;
|
||||
}
|
||||
.schedule .event.track-junghacker div.event-header {
|
||||
}
|
||||
.schedule .event.track-junghacker div.event-header a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.schedule .event.track-technik {
|
||||
border-color: #156dd0;
|
||||
}
|
||||
.schedule .event.track-technik div.event-header {
|
||||
}
|
||||
.schedule .event.track-technik div.event-header a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<xs:element ref="news-list"/>
|
||||
<xs:element ref="form" xmlns="http://www.w3.org/1999/xhtml"/>
|
||||
<xs:element ref="iframe" xmlns="http://www.w3.org/1999/xhtml"/>
|
||||
<xs:element ref="include-pentabarf-schedule"/>
|
||||
<xs:element ref="include-frab-schedule"/>
|
||||
<xs:element ref="resource"/>
|
||||
</xs:choice>
|
||||
</xs:group>
|
||||
|
@ -207,10 +207,10 @@
|
|||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="include-pentabarf-schedule">
|
||||
<xs:element name="include-frab-schedule">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="src" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="prefix" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="title" type="xs:string" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?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"
|
||||
version="1.0"
|
||||
encoding="utf-8"
|
||||
indent="yes"/>
|
||||
|
||||
<xsl:template match="/html">
|
||||
<xsl:apply-templates select="//div[@id='main-content']"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="div[@id='main-content']">
|
||||
<day title="{normalize-space(h2)}">
|
||||
<xsl:copy-of select=".//table[@class='rooms-table']"/>
|
||||
</day>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue