Fahrplanausdruck, schedule-table et cetera

git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@292 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
astro 2006-05-13 09:27:28 +00:00
parent 1edf12cb57
commit 99b94329cb
5 changed files with 109 additions and 5 deletions

View File

@ -9,7 +9,14 @@ DEPS=$(GUIDE_XML) $(GUIDE_XSL) $(SCHEDULE_XSL) $(SCHEDULE_XML) $(C3D2WEB_XSL)
FOP=~/programs/fop/fop
XEP=~/Java/XEP/xep
guide.pdf: $(DEPS)
$(FOP) -d -xml $(GUIDE_XML) -xsl $(GUIDE_XSL) -pdf $@
guide-xep.pdf: $(DEPS)
$(XEP) -xml $(GUIDE_XML) -xsl $(GUIDE_XSL) -pdf $@
guide.pdf: guide.fo
$(FOP) -d -fo guide.fo -pdf $@
guide-xep.pdf: guide.fo
$(XEP) -fo guide.fo -pdf $@
guide.fo: $(DEPS)
xsltproc $(GUIDE_XSL) $(GUIDE_XML) > $@
fahrplan.fo: $(DEPS)
xsltproc $(GUIDE_XSL) fahrplan.xml > $@
fahrplan.pdf: fahrplan.fo
$(FOP) -d -fo fahrplan.fo -pdf $@

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<guide xmlns='http://www.datenspuren.de/#guide'>
<title-page>
<section title='Datenspuren, 13. Mai 2006'>
<pull-schedule-table file='../../../www/datenspuren/fahrplan/days.de.html' day='1'/>
</section>
</title-page>
</guide>

View File

@ -1,6 +1,12 @@
<?xml version="1.0"?>
<guide xmlns='http://www.datenspuren.de/#guide'>
<title-page>
<section title='Programm'>
<pull-schedule-table file='../../../www/datenspuren/fahrplan/days.de.html'/>
</section>
</title-page>
<title-page>
<!--title>Datenspuren</title>
<title>2006</title>

View File

@ -80,7 +80,7 @@
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block text-align='start' font-family="serif" font-size="14pt" font-weight="bold" space-after="24pt">
<xsl:value-of select='conference/title'/>
Datenspuren 2006
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
@ -155,6 +155,9 @@
<xsl:template match='guide:pull-schedule'>
<xsl:apply-templates select='document(@file)'/>
</xsl:template>
<xsl:template match='guide:pull-schedule-table'>
<xsl:call-template name='schedule-table'/>
</xsl:template>
<!-- For c3d2web.xsl -->
<xsl:template match='guide:pull-c3d2web'>

View File

@ -1,6 +1,8 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:guide="http://www.datenspuren.de/#guide"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/schedule/conference">
@ -62,4 +64,81 @@
</fo:block>
</xsl:template>
<!-- schedule-table -->
<xsl:template name='schedule-table'>
<xsl:variable name='file' select='@file'/>
<xsl:variable name='day' select='@day'/>
<xsl:for-each select='document($file)//xhtml:table'>
<xsl:if test='($day = string(position())) or not($day)'>
<fo:table table-layout='fixed' width='100%' border-spacing='2mm' border-collapse='collapse'>
<fo:table-column column-width="20mm"/>
<!--fo:table-column column-width="72mm"-->
<fo:table-column column-width="proportional-column-width(1)">
<xsl:attribute name='number-columns-repeated'>
<xsl:value-of select='count(xhtml:thead/xhtml:tr/xhtml:th/xhtml:strong)'/>
</xsl:attribute>
</fo:table-column>
<fo:table-header>
<fo:table-row>
<xsl:for-each select='xhtml:thead/xhtml:tr/xhtml:th'>
<fo:table-cell>
<fo:block text-align='center' font-size='12pt' font-weight='bold'>
<xsl:value-of select='.'/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:for-each select='xhtml:tbody/xhtml:tr'>
<fo:table-row>
<xsl:for-each select='xhtml:td'>
<fo:table-cell padding='1mm' border='0.2mm dotted red' vertical-align='center' display-align='center'>
<xsl:attribute name="number-rows-spanned">
<xsl:value-of select="@rowspan"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test='@class="time"'>
<fo:block font-size='8pt'>
<xsl:value-of select='.'/>
</fo:block>
</xsl:when>
<xsl:when test='@class="room event "'>
<xsl:attribute name='border'>0.2mm solid black</xsl:attribute>
<fo:block font-size='16pt' font-family='serif' padding='2mm'
text-align='left' vertical-align='top' display-align='top'>
<xsl:value-of select='xhtml:p[@class="title"]/xhtml:a'/>
</fo:block>
<fo:block font-size='10pt' text-align='right' padding='2mm'
vertical-align='bottom' display-align='after'>
<xsl:for-each select='xhtml:ul[@class="speakers"]/xhtml:li/xhtml:a'>
<xsl:if test='position() &gt; 1'>, </xsl:if>
<xsl:value-of select="."/>
</xsl:for-each>
</fo:block>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name='background-color'>#e0e0e0</xsl:attribute>
<fo:block height='1em' font-size='12pt'/>
</xsl:otherwise>
</xsl:choose>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>