aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2011-05-04 12:38:45 +0200
committerLars Thorsen <[email protected]>2011-09-26 10:22:16 +0200
commit981c94e91701beb1d4f0bd52c90e864fe56770d7 (patch)
treed625d4ce86118846eaed352a7eae97754d4d0b57 /lib/erl_docgen
parent5606322f1d7e2be43cd9a6f438d8d7f75df0b933 (diff)
downloadotp-981c94e91701beb1d4f0bd52c90e864fe56770d7.tar.gz
otp-981c94e91701beb1d4f0bd52c90e864fe56770d7.tar.bz2
otp-981c94e91701beb1d4f0bd52c90e864fe56770d7.zip
[erl_docgen] Missing header level in PDF bookmarks menu
The System documentation PDF file was missing a header level in the bookmarks menu and the copyright year generation for PDF's was not correct.
Diffstat (limited to 'lib/erl_docgen')
-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"-->