[seam-commits] Seam SVN: r8517 - maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Jul 28 10:13:35 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-07-28 10:13:34 -0400 (Mon, 28 Jul 2008)
New Revision: 8517

Added:
   maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/fop1.xsl
Modified:
   maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/pdf.xsl
Log:
JBSEAM-3196

Added: maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/fop1.xsl
===================================================================
--- maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/fop1.xsl	                        (rev 0)
+++ maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/fop1.xsl	2008-07-28 14:13:34 UTC (rev 8517)
@@ -0,0 +1,71 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<xsl:template match="*" mode="fop1.outline">
+  <xsl:apply-templates select="*" mode="fop1.outline"/>
+</xsl:template>
+
+<xsl:template match="set|book|part|reference|
+                     preface|chapter|appendix|article
+                     |glossary|bibliography|index|setindex
+                     |refentry
+                     |sect1|sect2|sect3|sect4|sect5|section"
+              mode="fop1.outline">
+
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+  <xsl:variable name="bookmark-label">
+    <xsl:apply-templates select="." mode="object.title.markup"/>
+  </xsl:variable>
+
+  <!-- Put the root element bookmark at the same level as its children -->
+  <!-- If the object is a set or book, generate a bookmark for the toc -->
+
+  <xsl:choose>
+    <xsl:when test="parent::*">
+      <fo:bookmark internal-destination="{$id}" starting-state="hide">
+        <fo:bookmark-title>
+          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
+        </fo:bookmark-title>
+        <xsl:apply-templates select="*" mode="fop1.outline"/>
+      </fo:bookmark>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:bookmark internal-destination="{$id}" starting-state="hide">
+        <fo:bookmark-title>
+          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
+        </fo:bookmark-title>
+      </fo:bookmark>
+
+      <xsl:variable name="toc.params">
+        <xsl:call-template name="find.path.params">
+          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+        </xsl:call-template>
+      </xsl:variable>
+
+      <xsl:if test="contains($toc.params, 'toc')
+                    and (book|part|reference|preface|chapter|appendix|article
+                         |glossary|bibliography|index|setindex
+                         |refentry
+                         |sect1|sect2|sect3|sect4|sect5|section)">
+        <fo:bookmark internal-destination="toc...{$id}" starting-state="hide">
+          <fo:bookmark-title>
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'TableofContents'"/>
+            </xsl:call-template>
+          </fo:bookmark-title>
+        </fo:bookmark>
+      </xsl:if>
+      <xsl:apply-templates select="*" mode="fop1.outline"/>
+    </xsl:otherwise>
+  </xsl:choose>
+<!--
+  <fo:bookmark internal-destination="{$id}"/>
+-->
+</xsl:template>
+
+
+</xsl:stylesheet>


Property changes on: maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/fop1.xsl
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/pdf.xsl
===================================================================
--- maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/pdf.xsl	2008-07-28 12:47:55 UTC (rev 8516)
+++ maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/pdf.xsl	2008-07-28 14:13:34 UTC (rev 8517)
@@ -15,6 +15,7 @@
 
    <xsl:import href="classpath:/xslt/org/jboss/pdf.xsl"/>
    <xsl:import href="common.xsl"/>
+   <xsl:import href="fop1.xsl" />
       
    <!-- Change the font color for titles to SeamFramework.org one -->
    <xsl:param name="title.color">#576C74</xsl:param>




More information about the seam-commits mailing list