Skip to content

Commit 8b7f1f7

Browse files
committed
Merge branch 'PGPRO9_6' of gitlab.postgrespro.ru:pgpro-dev/postgrespro into PGPRO9_6
2 parents de7e59e + 3fe6fb3 commit 8b7f1f7

File tree

4 files changed

+721
-6
lines changed

4 files changed

+721
-6
lines changed

doc/src/sgml/stylesheet-common.xsl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
all output formats (HTML, HTML Help, XSL-FO, etc.).
88
-->
99

10+
<xsl:include href="stylesheet-speedup-common.xsl" />
1011

1112
<!-- Parameters -->
1213

13-
<xsl:param name="pg.fast" select="'0'"/>
14-
1514
<!--
1615
<xsl:param name="draft.mode">
1716
<xsl:choose>
@@ -31,9 +30,8 @@
3130
<xsl:param name="callout.graphics" select="'0'"></xsl:param>
3231
<xsl:param name="toc.section.depth">2</xsl:param>
3332
<xsl:param name="linenumbering.extension" select="'0'"></xsl:param>
34-
<xsl:param name="generate.index" select="1 - $pg.fast"></xsl:param>
35-
<xsl:param name="section.autolabel" select="1 - $pg.fast"></xsl:param>
36-
<xsl:param name="section.label.includes.component.label" select="1 - $pg.fast"></xsl:param>
33+
<xsl:param name="section.autolabel" select="1"></xsl:param>
34+
<xsl:param name="section.label.includes.component.label" select="1"></xsl:param>
3735
<xsl:param name="refentry.xref.manvolnum" select="0"/>
3836
<xsl:param name="formal.procedures" select="0"></xsl:param>
3937
<xsl:param name="punct.honorific" select="''"></xsl:param>
@@ -79,7 +77,9 @@
7977
<!-- Special support for Tcl synopses -->
8078

8179
<xsl:template match="optional[@role='tcl']">
82-
?<xsl:call-template name="inline.charseq"/>?
80+
<xsl:text>?</xsl:text>
81+
<xsl:call-template name="inline.charseq"/>
82+
<xsl:text>?</xsl:text>
8383
</xsl:template>
8484

8585
</xsl:stylesheet>
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3+
version='1.0'>
4+
5+
<!-- Performance-optimized versions of some upstream templates from common/
6+
directory -->
7+
8+
<!-- from common/labels.xsl -->
9+
10+
<xsl:template match="chapter" mode="label.markup">
11+
<xsl:choose>
12+
<xsl:when test="@label">
13+
<xsl:value-of select="@label"/>
14+
</xsl:when>
15+
<xsl:when test="string($chapter.autolabel) != 0">
16+
<xsl:if test="$component.label.includes.part.label != 0 and
17+
ancestor::part">
18+
<xsl:variable name="part.label">
19+
<xsl:apply-templates select="ancestor::part"
20+
mode="label.markup"/>
21+
</xsl:variable>
22+
<xsl:if test="$part.label != ''">
23+
<xsl:value-of select="$part.label"/>
24+
<xsl:apply-templates select="ancestor::part"
25+
mode="intralabel.punctuation">
26+
<xsl:with-param name="object" select="."/>
27+
</xsl:apply-templates>
28+
</xsl:if>
29+
</xsl:if>
30+
<xsl:variable name="format">
31+
<xsl:call-template name="autolabel.format">
32+
<xsl:with-param name="format" select="$chapter.autolabel"/>
33+
</xsl:call-template>
34+
</xsl:variable>
35+
<xsl:choose>
36+
<xsl:when test="$label.from.part != 0 and ancestor::part">
37+
<xsl:number from="part" count="chapter" format="{$format}" level="any"/>
38+
</xsl:when>
39+
<xsl:otherwise>
40+
<!-- Optimization for pgsql-docs: When counting to get label for
41+
this chapter, preceding chapters can only be our siblings or
42+
children of a preceding part, so only count those instead of
43+
scanning the entire node tree. -->
44+
<!-- <xsl:number from="book" count="chapter" format="{$format}" level="any"/> -->
45+
<xsl:number value="count(../preceding-sibling::part/chapter) + count(preceding-sibling::chapter) + 1" format="{$format}"/>
46+
</xsl:otherwise>
47+
</xsl:choose>
48+
</xsl:when>
49+
</xsl:choose>
50+
</xsl:template>
51+
52+
<xsl:template match="appendix" mode="label.markup">
53+
<xsl:choose>
54+
<xsl:when test="@label">
55+
<xsl:value-of select="@label"/>
56+
</xsl:when>
57+
<xsl:when test="string($appendix.autolabel) != 0">
58+
<xsl:if test="$component.label.includes.part.label != 0 and
59+
ancestor::part">
60+
<xsl:variable name="part.label">
61+
<xsl:apply-templates select="ancestor::part"
62+
mode="label.markup"/>
63+
</xsl:variable>
64+
<xsl:if test="$part.label != ''">
65+
<xsl:value-of select="$part.label"/>
66+
<xsl:apply-templates select="ancestor::part"
67+
mode="intralabel.punctuation">
68+
<xsl:with-param name="object" select="."/>
69+
</xsl:apply-templates>
70+
</xsl:if>
71+
</xsl:if>
72+
<xsl:variable name="format">
73+
<xsl:call-template name="autolabel.format">
74+
<xsl:with-param name="format" select="$appendix.autolabel"/>
75+
</xsl:call-template>
76+
</xsl:variable>
77+
<xsl:choose>
78+
<xsl:when test="$label.from.part != 0 and ancestor::part">
79+
<xsl:number from="part" count="appendix" format="{$format}" level="any"/>
80+
</xsl:when>
81+
<xsl:otherwise>
82+
<!-- Optimization for pgsql-docs: When counting to get label for
83+
this appendix, preceding appendixes can only be our siblings or
84+
children of a preceding part, so only count those instead of
85+
scanning the entire node tree. -->
86+
<!-- <xsl:number from="book|article" count="appendix" format="{$format}" level="any"/> -->
87+
<xsl:number value="count(../preceding-sibling::part/appendix) + count(preceding-sibling::appendix) + 1" format="{$format}"/>
88+
</xsl:otherwise>
89+
</xsl:choose>
90+
</xsl:when>
91+
</xsl:choose>
92+
</xsl:template>
93+
94+
</xsl:stylesheet>

0 commit comments

Comments
 (0)