Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit909cb78

Browse files
committed
doc: Further speed improvements for HTML XSLT build
1 parentcd1b215 commit909cb78

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

‎doc/src/sgml/stylesheet-speedup-common.xsl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,10 @@
9191
</xsl:choose>
9292
</xsl:template>
9393

94+
<!-- from common/l10n.xsl-->
95+
96+
<!-- Just hardcode the language for the whole document, to make it faster.-->
97+
98+
<xsl:templatename="l10n.language">en</xsl:template>
99+
94100
</xsl:stylesheet>

‎doc/src/sgml/stylesheet-speedup-xhtml.xsl

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,56 @@
251251
</xsl:call-template>
252252
</xsl:template>
253253

254+
<xsl:templatename="href.target">
255+
<xsl:paramname="context"select="."/>
256+
<xsl:paramname="object"select="."/>
257+
<xsl:paramname="toc-context"select="."/>
258+
<!-- Optimization for pgsql-docs: Remove support for dbhtml processing
259+
instruction here-->
260+
<xsl:variablename="href.to.uri">
261+
<xsl:call-templatename="href.target.uri">
262+
<xsl:with-paramname="object"select="$object"/>
263+
</xsl:call-template>
264+
</xsl:variable>
265+
<xsl:variablename="href.from.uri">
266+
<xsl:choose>
267+
<xsl:whentest="not($toc-context = .)">
268+
<xsl:call-templatename="href.target.uri">
269+
<xsl:with-paramname="object"select="$toc-context"/>
270+
</xsl:call-template>
271+
</xsl:when>
272+
<xsl:otherwise>
273+
<xsl:call-templatename="href.target.uri">
274+
<xsl:with-paramname="object"select="$context"/>
275+
</xsl:call-template>
276+
</xsl:otherwise>
277+
</xsl:choose>
278+
</xsl:variable>
279+
<xsl:variablename="href.to">
280+
<xsl:value-ofselect="$href.to.uri"/>
281+
</xsl:variable>
282+
<xsl:variablename="href.from">
283+
<xsl:call-templatename="trim.common.uri.paths">
284+
<xsl:with-paramname="uriA"select="$href.to.uri"/>
285+
<xsl:with-paramname="uriB"select="$href.from.uri"/>
286+
<xsl:with-paramname="return"select="'B'"/>
287+
</xsl:call-template>
288+
</xsl:variable>
289+
<xsl:variablename="depth">
290+
<xsl:call-templatename="count.uri.path.depth">
291+
<xsl:with-paramname="filename"select="$href.from"/>
292+
</xsl:call-template>
293+
</xsl:variable>
294+
<xsl:variablename="href">
295+
<xsl:call-templatename="copy-string">
296+
<xsl:with-paramname="string"select="'../'"/>
297+
<xsl:with-paramname="count"select="$depth"/>
298+
</xsl:call-template>
299+
<xsl:value-ofselect="$href.to"/>
300+
</xsl:variable>
301+
<xsl:value-ofselect="$href"/>
302+
</xsl:template>
303+
254304
<xsl:templatename="html.head">
255305
<xsl:paramname="prev"select="/foo"/>
256306
<xsl:paramname="next"select="/foo"/>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp