]> granicus.if.org Git - docbook-dsssl/commitdiff
Added support for AntennaHouse XSL Formatter. You can use axf.extensions=1 setting...
authorJirka Kosek <jirka@kosek.cz>
Thu, 15 May 2003 17:30:35 +0000 (17:30 +0000)
committerJirka Kosek <jirka@kosek.cz>
Thu, 15 May 2003 17:30:35 +0000 (17:30 +0000)
12 files changed:
xsl/fo/autoidx.xsl
xsl/fo/autotoc.xsl
xsl/fo/component.xsl
xsl/fo/division.xsl
xsl/fo/docbook.xsl
xsl/fo/index.xsl
xsl/fo/param.ent
xsl/fo/param.xweb
xsl/fo/refentry.xsl
xsl/fo/sections.xsl
xsl/params/axf.extensions.xml [new file with mode: 0644]
xsl/params/xep.extensions.xml

index d7f499de55aefb504a6c6878fe481923b6d8edcc..a729b2345b4fb749dd1604ffb4fcbb00d1a5f6f0 100644 (file)
@@ -14,6 +14,7 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:rx="http://www.renderx.com/XSL/Extensions"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version="1.0">
 
 <!-- ********************************************************************
   <xsl:variable name="key" select="&primary;"/>
   <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
   <fo:block>
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
+    </xsl:if>
     <xsl:value-of select="primary"/>
 
     <xsl:choose>
   <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
   <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
   <fo:block>
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
+    </xsl:if>
     <xsl:value-of select="secondary"/>
 
     <xsl:choose>
   <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
   <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
   <fo:block>
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
+    </xsl:if>
     <xsl:value-of select="tertiary"/>
 
     <xsl:choose>
index bcc94cb086fa0f8153b7c96bdbea9d535c10aa3b..cd8d06ff7cf12dac8405d24441e4ff23ed736abe 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
 <!-- ********************************************************************
   <xsl:if test="$nodes">
     <fo:block id="toc...{$id}"
               xsl:use-attribute-sets="toc.margin.properties">
+      <xsl:if test="$axf.extensions != 0">
+        <xsl:attribute name="axf:outline-level">1</xsl:attribute>
+        <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+        <xsl:attribute name="axf:outline-title">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'TableofContents'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
       <xsl:call-template name="table.of.contents.titlepage"/>
       <xsl:apply-templates select="$nodes" mode="toc">
         <xsl:with-param name="toc-context" select="$toc-context"/>
   <xsl:if test="$nodes">
     <fo:block id="toc...{$cid}"
               xsl:use-attribute-sets="toc.margin.properties">
+      <xsl:if test="$axf.extensions != 0">
+        <xsl:attribute name="axf:outline-level">1</xsl:attribute>
+        <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+        <xsl:attribute name="axf:outline-title">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'TableofContents'"/>
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
       <xsl:call-template name="table.of.contents.titlepage"/>
       <xsl:apply-templates select="$nodes" mode="toc">
         <xsl:with-param name="toc-context" select="$toc-context"/>
index fa2c18486d18bdfc20592e5799182387116464a2..0c2c59d859724a9703e860b5ffd78a7e8d81af73 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
 <!-- ********************************************************************
         <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
       </xsl:call-template>
     </xsl:attribute>
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:outline-level">
+        <xsl:value-of select="count($node/ancestor::*)"/>
+      </xsl:attribute>
+      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+      <xsl:attribute name="axf:outline-title">
+        <xsl:value-of select="$title"/>
+      </xsl:attribute>
+    </xsl:if>
     <xsl:copy-of select="$title"/>
   </fo:block>
 </xsl:template>
index 90812855bf9d3eccacf74d97b2ced8fd68de46d9..3b216ff6c6409e58d8334d6efb9188692d55d1a2 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
 <!-- ********************************************************************
 
   <fo:block keep-with-next.within-column="always"
             hyphenate="false">
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:outline-level">
+        <xsl:choose>
+          <xsl:when test="count($node/ancestor::*) > 0">
+            <xsl:value-of select="count($node/ancestor::*)"/>
+          </xsl:when>
+          <xsl:otherwise>1</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+      <xsl:attribute name="axf:outline-title">
+        <xsl:value-of select="$title"/>
+      </xsl:attribute>
+    </xsl:if>
     <xsl:copy-of select="$title"/>
   </fo:block>
 </xsl:template>
index 18793979237675f0d32b7ea27f98de1be9431c12..aeb20c2c218c50e8387dbfe966a35f91864b48e5 100644 (file)
@@ -69,6 +69,7 @@
 <xsl:include href="fop.xsl"/>
 <xsl:include href="passivetex.xsl"/>
 <xsl:include href="xep.xsl"/>
+<xsl:include href="axf.xsl"/>
 
 <xsl:param name="stylesheet.result.type" select="'fo'"/>
 
     <xsl:if test="$xep.extensions != 0">
       <xsl:call-template name="xep-document-information"/>
     </xsl:if>
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:call-template name="axf-document-information"/>
+    </xsl:if>
     <xsl:call-template name="setup.pagemasters"/>
     <xsl:choose>
       <xsl:when test="$rootid != ''">
index 8a9b285b48efb83e0b32c837271d312637df429d..75b318829b712f31665d2e28de2acc04b505ef7b 100644 (file)
 <!-- ==================================================================== -->
 
 <xsl:template match="indexterm" name="indexterm">
-  <fo:wrapper>
+  <!-- Temporal workaround for bug in AXF -->
+  <xsl:variable name="wrapper.name">
+    <xsl:choose>
+      <xsl:when test="$axf.extensions != 0">fo:block</xsl:when>
+      <xsl:otherwise>fo:wrapper</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:element name="{$wrapper.name}">
     <xsl:attribute name="id">
       <xsl:call-template name="object.id"/>
     </xsl:attribute>
         </xsl:comment>
       </xsl:otherwise>
     </xsl:choose>
-  </fo:wrapper>
+  </xsl:element>
 </xsl:template>
 
 <xsl:template match="indexterm[@class='startofrange']">
index 9d89e2de4652eddf3a21cae146fd153e90adff95..2b5860297639bc29f57640528a65ff30f3dddfdc 100644 (file)
@@ -9,6 +9,7 @@
 <!ENTITY arbortext.extensions SYSTEM "../params/arbortext.extensions.xml">
 <!ENTITY author.othername.in.middle SYSTEM "../params/author.othername.in.middle.xml">
 <!ENTITY autotoc.label.separator SYSTEM "../params/autotoc.label.separator.xml">
+<!ENTITY axf.extensions SYSTEM "../params/axf.extensions.xml">
 <!ENTITY biblioentry.item.separator SYSTEM "../params/biblioentry.item.separator.xml">
 <!ENTITY bibliography.collection SYSTEM "../params/bibliography.collection.xml">
 <!ENTITY blockquote.properties SYSTEM "../params/blockquote.properties.xml">
index 5e95248669df3cd47bea8e2632d1b635f0ad3930..ac99f2a9c756e4dcd2f75bca29038ca54bf6b48c 100644 (file)
@@ -107,6 +107,7 @@ generate.section.toc.level;
 
 <reference><title>Processor Extensions</title>
 &arbortext.extensions;
+&axf.extensions;
 &fop.extensions;
 &passivetex.extensions;
 &tex.math.in.alt;
@@ -455,6 +456,7 @@ around all these parameters.</para>
 <src:fragref linkend="arbortext.extensions.frag"/>
 <src:fragref linkend="author.othername.in.middle.frag"/>
 <src:fragref linkend="autotoc.label.separator.frag"/>
+<src:fragref linkend="axf.extensions.frag"/>
 <src:fragref linkend="biblioentry.item.separator.frag"/>
 <src:fragref linkend="bibliography.collection.frag"/>
 <src:fragref linkend="bibliography.numbered.frag"/>
index 9839a26fcc29be2ca1d29043a827953175a5ec75..cc84dfddd26ca1deb49834b52279f17220d50ddc 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
 <!-- ********************************************************************
       </fotex:bookmark>
     </xsl:if>
 
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:outline-level">
+        <xsl:value-of select="count(ancestor::*)-1"/>
+      </xsl:attribute>
+      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+      <xsl:attribute name="axf:outline-title">
+        <xsl:value-of select="$title"/>
+      </xsl:attribute>
+    </xsl:if>
+
     <xsl:call-template name="section.heading">
       <xsl:with-param name="level" select="$level"/>
       <xsl:with-param name="title" select="$title"/>
index 27f0aee5ac18b040fb40b401acd5f7844c195c24..195f67639dec91ee1a9cad3047ffd0795c4c6d47 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
 <!-- ********************************************************************
       </fotex:bookmark>
     </xsl:if>
 
+    <xsl:if test="$axf.extensions != 0">
+      <xsl:attribute name="axf:outline-level">
+        <xsl:value-of select="count(ancestor::*)-1"/>
+      </xsl:attribute>
+      <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
+      <xsl:attribute name="axf:outline-title">
+        <xsl:value-of select="$title"/>
+      </xsl:attribute>
+    </xsl:if>
+
     <xsl:call-template name="section.heading">
       <xsl:with-param name="level" select="$level"/>
       <xsl:with-param name="title" select="$title"/>
diff --git a/xsl/params/axf.extensions.xml b/xsl/params/axf.extensions.xml
new file mode 100644 (file)
index 0000000..98278bd
--- /dev/null
@@ -0,0 +1,25 @@
+<refentry id="axf.extensions">
+<refmeta>
+<refentrytitle>axf.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>axf.extensions</refname>
+<refpurpose>Enable XSL Formatter extensions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='axf.extensions.frag'>
+<xsl:param name="axf.extensions" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero,
+<ulink url="http://www.antennahouse.com/">XSL Formatter</ulink>
+extensions will be used. XSL Formatter extensions consists of PDF bookmarks,
+document information and better index processing.</para>
+
+</refsect1>
+</refentry>
index 9e5caffb4d07e50cd8bc577c92840d63ba233ed2..c33fe17ea9ab44c0cba090d966e05a340fb306a2 100644 (file)
@@ -16,7 +16,8 @@
 
 <para>If non-zero,
 <ulink url="http://www.renderx.com/">XEP</ulink>
-extensions will be used. XEP extensions consists of PDF bookmarks and document information.
+extensions will be used. XEP extensions consists of PDF bookmarks,
+document information and better index processing.
 </para>
 
 </refsect1>