aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2011-09-26 10:25:09 +0200
committerLars Thorsen <[email protected]>2011-09-26 10:25:09 +0200
commit3992f3308fd2d84e46f930e4181ee29d2389ff96 (patch)
treed625d4ce86118846eaed352a7eae97754d4d0b57
parent5606322f1d7e2be43cd9a6f438d8d7f75df0b933 (diff)
parent981c94e91701beb1d4f0bd52c90e864fe56770d7 (diff)
downloadotp-3992f3308fd2d84e46f930e4181ee29d2389ff96.tar.gz
otp-3992f3308fd2d84e46f930e4181ee29d2389ff96.tar.bz2
otp-3992f3308fd2d84e46f930e4181ee29d2389ff96.zip
Merge branch 'lars/erl_docgen/pdf-menu/OTP-9576' into dev
* lars/erl_docgen/pdf-menu/OTP-9576: [erl_docgen] Missing header level in PDF bookmarks menu
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf.xsl21
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf_params.xsl2
2 files changed, 12 insertions, 11 deletions
diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl
index 35f6349f70..48a7a026c1 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl
@@ -732,22 +732,23 @@
<xsl:template name="bookmarks1">
<xsl:param name="entries"/>
<xsl:if test="$entries != ''">
+ <xsl:for-each select="$entries">
- <fo:bookmark internal-destination="{generate-id(/book/parts/part)}"
- starting-state="hide">
- <fo:bookmark-title>User's Guide</fo:bookmark-title>
-
- <xsl:for-each select="$entries">
+ <fo:bookmark internal-destination="{generate-id(header/title)}"
+ starting-state="hide">
+ <fo:bookmark-title><xsl:value-of select="header/title"/></fo:bookmark-title>
+
<xsl:call-template name="bookmarks2">
<xsl:with-param name="entries"
select="chapter[header/title]"/>
</xsl:call-template>
- </xsl:for-each>
-
- </fo:bookmark>
+
+ </fo:bookmark>
+ </xsl:for-each>
</xsl:if>
</xsl:template>
+
<xsl:template name="bookmarks2">
<xsl:param name="entries"/>
<xsl:for-each select="$entries">
@@ -934,9 +935,9 @@
<xsl:template match="part">
<xsl:variable name="partnum"><xsl:number level="any" from="book" count="part|application"/></xsl:variable>
- <fo:block xsl:use-attribute-sets="h1" id="{generate-id()}">
+ <fo:block xsl:use-attribute-sets="h1" id="{generate-id(header/title)}">
<xsl:value-of select="$partnum"/>&#160;&#160;&#160;
- <xsl:text>User's Guide</xsl:text>
+ <xsl:value-of select="header/title"/>
</fo:block>
<xsl:apply-templates select="description">
diff --git a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
index 3dfecf8b74..d2f0350cf1 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
@@ -29,7 +29,7 @@
<!-- Fixed strings -->
<xsl:variable name="companyname"><xsl:value-of select="/book/header/copyright/holder"/></xsl:variable>
- <xsl:variable name="copyright">Copyright &#169; <xsl:value-of select="/book/header/copyright/year[1]"/><xsl:text>-</xsl:text><xsl:value-of select="substring-after(substring-after($gendate, ' '), ' ')"/></xsl:variable>
+ <xsl:variable name="copyright">Copyright &#169; <xsl:value-of select="/book/header/copyright/year[1]"/><xsl:text>-</xsl:text><xsl:value-of select="substring-after(normalize-space(substring-after($gendate, ' ')), ' ')"/></xsl:variable>
<!-- FIXME: remove when appendix creation has been fixed -->
<!-- xsl:variable name="appendix_title"-->