Fixed c3d2web inclusion + definition lists support

git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@283 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
astro 2006-05-12 00:55:37 +00:00
parent dde3c3ace7
commit 9927331111
3 changed files with 37 additions and 17 deletions

View File

@ -4,10 +4,11 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match='pull-c3d2web/page/p'>
<xsl:template match='p'>
<xsl:choose>
<xsl:when test='@class="title"'>
<fo:block text-align='center' padding='2mm 0mm'>
<fo:block font-weight='bold' text-align='center' padding='2mm 0mm'
keep-together.within-column="always" keep-with-next.within-column="always">
<xsl:apply-templates/>
</fo:block>
</xsl:when>
@ -18,4 +19,22 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match='dl'>
<fo:block>
<xsl:apply-templates select='dt|dd'/>
</fo:block>
</xsl:template>
<xsl:template match='dl/dt'>
<fo:block font-weight='bold'>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match='dl/dd'>
<fo:block text-align='right'>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<guide>
<guide xmlns='http://www.datenspuren.de/#guide'>
<title-page>
<title>Datenspuren</title>
<title>2006</title>

View File

@ -1,12 +1,13 @@
<?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:fo="http://www.w3.org/1999/XSL/Format">
<xsl:include href='schedule.xsl'/>
<xsl:include href='schedule.xsl'/>
<xsl:include href='c3d2web.xsl'/>
<xsl:template match="/guide">
<xsl:template match="/guide:guide">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
@ -33,7 +34,7 @@
</fo:root>
</xsl:template>
<xsl:template match='title-page'>
<xsl:template match='guide:title-page'>
<fo:page-sequence master-reference="TitlePage">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates/>
@ -41,25 +42,25 @@
</fo:page-sequence>
</xsl:template>
<xsl:template match='title-page/title'>
<xsl:template match='guide:title-page/guide:title'>
<fo:block font-size='48pt' font-weight='bold' text-align='center'>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match='title-page/space'>
<xsl:template match='guide:title-page/guide:space'>
<fo:block>
<xsl:attribute name='padding'><xsl:value-of select='@height'/> 0mm 0mm 0mm</xsl:attribute>
</fo:block>
</xsl:template>
<xsl:template match='title-page/note'>
<xsl:template match='guide:title-page/guide:note'>
<fo:block font-size='24pt' text-align='center'>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match='page-sequence'>
<xsl:template match='guide:page-sequence'>
<fo:page-sequence master-reference="A4">
<fo:static-content flow-name="xsl-region-before">
@ -91,8 +92,8 @@
</xsl:template>
<!-- TOC -->
<xsl:template match='table-of-contents'>
<xsl:for-each select="//section">
<xsl:template match='guide:table-of-contents'>
<xsl:for-each select="//guide:section">
<fo:list-block>
<fo:list-item>
@ -114,7 +115,7 @@
<!-- For guide.xml -->
<xsl:template match='section'>
<xsl:template match='guide:section'>
<fo:block padding='5mm 5mm'>
<fo:block font-size='18pt' font-weight='bold' font-family='serif' text-align='center'
border-top-style='solid' border-bottom-style='solid'
@ -130,20 +131,20 @@
<xsl:apply-templates/>
</xsl:template>
<xsl:template match='p'>
<xsl:template match='guide:p'>
<fo:block font-family='serif' text-align='justify' padding='2mm 0mm'>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<!-- For schedule.xsl -->
<xsl:template match='pull-schedule'>
<xsl:template match='guide:pull-schedule'>
<xsl:apply-templates select='document(@file)'/>
</xsl:template>
<!-- For c3d2web.xsl -->
<xsl:template match='pull-c3d2web'>
<xsl:apply-templates select='document(@file)'/>
<xsl:template match='guide:pull-c3d2web'>
<xsl:apply-templates select='document(@file)/page'/>
</xsl:template>
</xsl:stylesheet>