Author: sjur
Date: Fri Sep 5 06:01:34 2008
New Revision: 692432
URL: http://svn.apache.org/viewvc?rev=692432&view=rev
Log:
Bringing the skin-based FO transformation in line with the dispatcher variants
by adding the font-family attribute, and at the same time adding support for
user-specification of the font family for two more content categories:
* notice
* TOC
Also adjusted some measurements to be identical to the dispatcher variants.
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl?rev=692432&r1=692431&r2=692432&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
Fri Sep 5 06:01:34 2008
@@ -214,6 +214,22 @@
<xsl:otherwise><xsl:value-of select="$sans-serif"/></xsl:otherwise>
</xsl:choose>
</xsl:param>
+ <xsl:param name="abstractFontFamily">
+ <xsl:choose>
+ <xsl:when test="$properties/[EMAIL
PROTECTED]'output.pdf.fontFamily.abstractFontFamily']">
+ <xsl:value-of select="$properties/[EMAIL
PROTECTED]'output.pdf.fontFamily.abstractFontFamily']/@value"/>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$serif"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+ <xsl:param name="noticeFontFamily">
+ <xsl:choose>
+ <xsl:when test="$properties/[EMAIL
PROTECTED]'output.pdf.fontFamily.noticeFontFamily']">
+ <xsl:value-of select="$properties/[EMAIL
PROTECTED]'output.pdf.fontFamily.noticeFontFamily']/@value"/>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$serif"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
<xsl:param name="TOCTitleFontFamily">
<xsl:choose>
<xsl:when test="$properties/[EMAIL
PROTECTED]'output.pdf.fontFamily.TOCTitleFontFamily']">
@@ -222,6 +238,14 @@
<xsl:otherwise><xsl:value-of select="$sans-serif"/></xsl:otherwise>
</xsl:choose>
</xsl:param>
+ <xsl:param name="TOCFontFamily">
+ <xsl:choose>
+ <xsl:when test="$properties/[EMAIL
PROTECTED]'output.pdf.fontFamily.TOCFontFamily']">
+ <xsl:value-of select="$properties/[EMAIL
PROTECTED]'output.pdf.fontFamily.TOCFontFamily']/@value"/>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$serif"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
<!-- helper-commonElements.xsl font-family definitions: -->
<xsl:param name="sectionTitleFontFamily">
<xsl:choose>
@@ -301,7 +325,8 @@
match="/">
<fo:root
xmlns:fo="http://www.w3.org/1999/XSL/Format"
- font-family="{$rootFontFamily}" font-size="12pt">
+ font-family="{$rootFontFamily}"
+ font-size="12pt">
<fo:layout-master-set>
<fo:simple-page-master
master-name="first-page"
@@ -548,6 +573,8 @@
text-align="center"
space-before="20pt"
space-after="25pt"
+ width="7.5in"
+ font-family="{$abstractFontFamily}"
font-style="italic">
<xsl:call-template
name="insertPageBreaks" />
@@ -558,8 +585,10 @@
match="notice">
<fo:block
font-size="10pt"
+ font-family="{$noticeFontFamily}"
text-align="left"
space-before="20pt"
+ width="7.5in"
border-top="0.25pt solid"
border-bottom="0.25pt solid"
padding-before="6pt"
@@ -591,7 +620,7 @@
<xsl:apply-templates select="@tag"/>
<xsl:choose>
<xsl:when test="starts-with(., '$Revision: ')">
- Version <xsl:value-of select="substring(., 12, string-length(.)
-11-2)"/>
+<!-- insert i18n stuff here --> Version <xsl:value-of select="substring(., 12,
string-length(.) -11-2)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
@@ -625,13 +654,19 @@
space-after="0.5em"
space-before="1em"
text-align="justify"
+ width="7.5in"
id="__toc__">
<xsl:call-template name="insertPageBreaks"/>
<!-- insert i18n stuff here -->
<xsl:text>Table of contents</xsl:text>
</fo:block>
- <fo:block font-size="12pt" space-after="5pt"
- space-before="0pt" text-align="justify">
+ <fo:block
+ font-family="{$TOCFontFamily}"
+ font-size="12pt"
+ space-after="5pt"
+ space-before="0pt"
+ text-align="justify"
+ width="7.5in">
<xsl:if test="$page-break-top-sections">
<xsl:attribute name="break-after">page</xsl:attribute>
</xsl:if>