forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r692397 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-abstract.ft
Date Fri, 05 Sep 2008 09:37:32 GMT
Author: sjur
Date: Fri Sep  5 02:37:31 2008
New Revision: 692397

URL: http://svn.apache.org/viewvc?rev=692397&view=rev
Log:
Added support for user-specification of the font family.

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-abstract.ft

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-abstract.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-abstract.ft?rev=692397&r1=692396&r2=692397&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-abstract.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-abstract.ft
Fri Sep  5 02:37:31 2008
@@ -34,6 +34,16 @@
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:fo="http://www.w3.org/1999/XSL/Format"
       version="1.0">
+      <xsl:param name="defaultVariables" select="'test.html'"/>
+      <xsl:param name="serif" select="$defaultVariables/*/*[@name='output.pdf.fontFamily.serif']/@value"
/>
+      <xsl:param name="abstractFontFamily">
+        <xsl:choose>
+          <xsl:when test="$defaultVariables/*/*[@name='output.pdf.fontFamily.abstractFontFamily']">
+            <xsl:value-of select="$defaultVariables/*/*[@name='output.pdf.fontFamily.abstractFontFamily']/@value"/>
+          </xsl:when>
+          <xsl:otherwise><xsl:value-of select="$serif"/></xsl:otherwise>
+        </xsl:choose>
+      </xsl:param>
       <xsl:include href="lm://pdf.transform.helper.pageBreaks" />
       <xsl:template match="/">
         <forrest:content>
@@ -44,7 +54,7 @@
               space-before="20pt"
               space-after="25pt"
               width="7.5in"
-              font-family="serif"
+              font-family="{$abstractFontFamily}"
               font-style="italic">
               <xsl:call-template name="insertPageBreaks"/>
               <xsl:apply-templates select="//div[@class='abstract']"/>



Mime
View raw message