of the bookmark tree. When the parameter has a non-zero value (the default),
only the top-level bookmarks are displayed initially. Otherwise, the whole
tree of bookmarks is displayed.
This is implemented for FOP 0.9X. Closes FR #
1792326.
<!-- ==================================================================== -->
+<xsl:variable name="bookmarks.state">
+ <xsl:choose>
+ <xsl:when test="$bookmarks.collapse != 0">hide</xsl:when>
+ <xsl:otherwise>show</xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
+
<xsl:template match="*" mode="fop1.outline">
<xsl:apply-templates select="*" mode="fop1.outline"/>
</xsl:template>
<xsl:when test="self::index and $generate.index = 0"/>
<xsl:when test="parent::*">
<fo:bookmark internal-destination="{$id}">
+ <xsl:attribute name="starting-state">
+ <xsl:value-of select="$bookmarks.state"/>
+ </xsl:attribute>
<fo:bookmark-title>
<xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
</fo:bookmark-title>
</xsl:when>
<xsl:otherwise>
<fo:bookmark internal-destination="{$id}">
+ <xsl:attribute name="starting-state">
+ <xsl:value-of select="$bookmarks.state"/>
+ </xsl:attribute>
<fo:bookmark-title>
<xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
</fo:bookmark-title>
<!ENTITY glossdef.list.properties SYSTEM "../params/glossdef.list.properties.xml">
<!ENTITY glossdef.block.properties SYSTEM "../params/glossdef.block.properties.xml">
<!ENTITY glossentry.list.item.properties SYSTEM "../params/glossentry.list.item.properties.xml">
+<!ENTITY bookmarks.collapse SYSTEM "../params/bookmarks.collapse.xml">
§ion.container.element;
&monospace.verbatim.font.width;
&exsl.node.set.available;
+&bookmarks.collapse;
</reference>
<reference xml:id="graphics"><title>Graphics</title>
&graphic.default.extension;
<src:fragref linkend="body.margin.top.frag"/>
<src:fragref linkend="body.start.indent.frag"/>
<src:fragref linkend="body.end.indent.frag"/>
+<src:fragref linkend="bookmarks.collapse.frag"/>
<src:fragref linkend="bridgehead.in.toc.frag"/>
<src:fragref linkend="callout.defaultcolumn.frag"/>
<src:fragref linkend="callout.graphics.extension.frag"/>
--- /dev/null
+<refentry xmlns="http://docbook.org/ns/docbook"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="5.0" xml:id="bookmarks.collapse">
+<refmeta>
+<refentrytitle>bookmarks.collapse</refentrytitle>
+<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bookmarks.collapse</refname>
+<refpurpose>Specifies the initial state of bookmarks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment xml:id="bookmarks.collapse.frag">
+<xsl:param name="bookmarks.collapse" select="1"></xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsection><info><title>Description</title></info>
+
+<para>If non-zero, the bookmark tree is collapsed so that only the
+top-level bookmarks are displayed initially. Otherwise, the whole tree
+of bookmarks is displayed.</para>
+
+<para>This parameter currently works with FOP 0.93 or later.</para>
+
+</refsection>
+</refentry>