diff options
-rw-r--r-- | doc/src/sgml/stylesheet-speedup-common.xsl | 6 | ||||
-rw-r--r-- | doc/src/sgml/stylesheet-speedup-xhtml.xsl | 50 |
2 files changed, 56 insertions, 0 deletions
diff --git a/doc/src/sgml/stylesheet-speedup-common.xsl b/doc/src/sgml/stylesheet-speedup-common.xsl index 007fdf6d633..e3fb582a1cc 100644 --- a/doc/src/sgml/stylesheet-speedup-common.xsl +++ b/doc/src/sgml/stylesheet-speedup-common.xsl @@ -91,4 +91,10 @@ </xsl:choose> </xsl:template> +<!-- from common/l10n.xsl --> + +<!-- Just hardcode the language for the whole document, to make it faster. --> + +<xsl:template name="l10n.language">en</xsl:template> + </xsl:stylesheet> diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl b/doc/src/sgml/stylesheet-speedup-xhtml.xsl index ff08bef808c..da0f2b5a970 100644 --- a/doc/src/sgml/stylesheet-speedup-xhtml.xsl +++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl @@ -251,6 +251,56 @@ </xsl:call-template> </xsl:template> +<xsl:template name="href.target"> + <xsl:param name="context" select="."/> + <xsl:param name="object" select="."/> + <xsl:param name="toc-context" select="."/> + <!-- Optimization for pgsql-docs: Remove support for dbhtml processing + instruction here --> + <xsl:variable name="href.to.uri"> + <xsl:call-template name="href.target.uri"> + <xsl:with-param name="object" select="$object"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="href.from.uri"> + <xsl:choose> + <xsl:when test="not($toc-context = .)"> + <xsl:call-template name="href.target.uri"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="href.target.uri"> + <xsl:with-param name="object" select="$context"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="href.to"> + <xsl:value-of select="$href.to.uri"/> + </xsl:variable> + <xsl:variable name="href.from"> + <xsl:call-template name="trim.common.uri.paths"> + <xsl:with-param name="uriA" select="$href.to.uri"/> + <xsl:with-param name="uriB" select="$href.from.uri"/> + <xsl:with-param name="return" select="'B'"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="depth"> + <xsl:call-template name="count.uri.path.depth"> + <xsl:with-param name="filename" select="$href.from"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="href"> + <xsl:call-template name="copy-string"> + <xsl:with-param name="string" select="'../'"/> + <xsl:with-param name="count" select="$depth"/> + </xsl:call-template> + <xsl:value-of select="$href.to"/> + </xsl:variable> + <xsl:value-of select="$href"/> +</xsl:template> + <xsl:template name="html.head"> <xsl:param name="prev" select="/foo"/> <xsl:param name="next" select="/foo"/> |