|
70 | 70 | <xsl:apply-templatesmode="no.anchor.mode"/>
|
71 | 71 | </xsl:template>
|
72 | 72 |
|
| 73 | +<!-- include refsects in PDF bookmarks |
| 74 | + (https://github.com/docbook/xslt10-stylesheets/issues/46)--> |
| 75 | + |
| 76 | +<xsl:templatematch="refsect1|refsect2|refsect3" |
| 77 | +mode="bookmark"> |
| 78 | + |
| 79 | + <xsl:variablename="id"> |
| 80 | + <xsl:call-templatename="object.id"/> |
| 81 | + </xsl:variable> |
| 82 | + <xsl:variablename="bookmark-label"> |
| 83 | + <xsl:apply-templatesselect="."mode="object.title.markup"/> |
| 84 | + </xsl:variable> |
| 85 | + |
| 86 | + <fo:bookmarkinternal-destination="{$id}"> |
| 87 | + <xsl:attributename="starting-state"> |
| 88 | + <xsl:value-ofselect="$bookmarks.state"/> |
| 89 | + </xsl:attribute> |
| 90 | + <fo:bookmark-title> |
| 91 | + <xsl:value-ofselect="normalize-space($bookmark-label)"/> |
| 92 | + </fo:bookmark-title> |
| 93 | + <xsl:apply-templatesselect="*"mode="bookmark"/> |
| 94 | + </fo:bookmark> |
| 95 | +</xsl:template> |
| 96 | + |
73 | 97 | </xsl:stylesheet>
|