]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed indexterm id target for axf.extensions to use fo:block or fo:inline.
authorBob Stayton <bobs@sagehill.net>
Fri, 8 Apr 2005 20:49:41 +0000 (20:49 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 8 Apr 2005 20:49:41 +0000 (20:49 +0000)
Remove it if AH decides to support fo:wrapper as the link target.

xsl/fo/index.xsl

index f4aaa7925e09395ee0ba73630c4f7e7a23e4675d..ccc528e79895a0dba7e21790b0bf5f6ce44a44cd 100644 (file)
   <!-- Temporal workaround for bug in AXF -->
   <xsl:variable name="wrapper.name">
     <xsl:choose>
-      <xsl:when test="$axf.extensions != 0">fo:block</xsl:when>
+      <xsl:when test="$axf.extensions != 0">
+        <xsl:call-template name="inline.or.block"/>
+      </xsl:when>
       <xsl:otherwise>fo:wrapper</xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
   </fo:block>
 </xsl:template>
 
+<!-- Determines if an object should be inserted as an fo:inline
+     or an fo:block.  Used for indexterms -->
+<xsl:template name="inline.or.block">
+  <xsl:param name="parentnode" select=".."/>
+
+  <xsl:variable name="parent" select="local-name($parentnode)"/>
+
+  <xsl:variable name="block.parents" select="'|answer|appendix|appendixinfo|article|articleinfo|bibliodiv|bibliography|bibliographyinfo|blockinfo|blockquote|bookinfo|callout|caution|chapter|chapterinfo|dedication|example|figure|formalpara|funcsynopsisinfo|glossary|glossaryinfo|glossdef|glossdiv|glossentry|highlights|important|index|indexinfo|informalexample|informalfigure|informaltable|itemizedlist|legalnotice|listitem|msgexplan|msgtext|note|objectinfo|orderedlist|partinfo|partintro|preface|prefaceinfo|procedure|qandadiv|qandaset|question|refentry|refentryinfo|referenceinfo|refmeta|refmiscinfo|refsect1|refsect1info|refsect2|refsect2info|refsect3|refsect3info|refsection|refsectioninfo|refsynopsisdiv|refsynopsisdivinfo|revdescription|screeninfo|sect1|sect1info|sect2|sect2info|sect3|sect3info|sect4|sect4info|sect5|sect5info|section|sectioninfo|setindex|setindexinfo|setinfo|sidebar|sidebarinfo|simplesect|step|table|task|taskprerequisites|taskrelated|tasksummary|tip|variablelist|warning|'"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($parent, $block.parents)">fo:block</xsl:when>
+    <xsl:otherwise>fo:inline</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
 </xsl:stylesheet>