summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2016-11-16 20:00:00 +0000
committerPeter Eisentraut2016-11-16 19:53:35 +0000
commit380895f2deb18ed9e7a8be69961af2ed221ba9d3 (patch)
tree3dacafe081926b70176b517eb1698fc709f39145
parente36ddab11735052841b4eff96642187ec9a8a7bc (diff)
doc: Further XSLT HTML build performance optimization
Cut out some expensive stuff from the HTML head element that we don't really need. This was previously discussed as part of e8306745e3504c642f7abad411139d5630e29fac, but ended up separate because it changes the output contents slightly.
-rw-r--r--doc/src/sgml/stylesheet-speedup-xhtml.xsl41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
index 53c811cab02..ff08bef808c 100644
--- a/doc/src/sgml/stylesheet-speedup-xhtml.xsl
+++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
@@ -251,4 +251,45 @@
</xsl:call-template>
</xsl:template>
+<xsl:template name="html.head">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+
+ <!-- Optimization for pgsql-docs: Cut out a bunch of things we don't need
+ here, including an expensive //legalnotice search. -->
+
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+
+ <xsl:if test="$prev">
+ <link rel="prev">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$next">
+ <link rel="next">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:call-template name="user.head.content"/>
+ </head>
+</xsl:template>
+
</xsl:stylesheet>