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

Commit0012979

Browse files
committed
docs: html: copy images to output as part of xslt build
Until now the meson built HTML docs had non-working references to images. Theywere copied in the make target. Instead of duplicating that for meson, copythem as part of the xslt stylesheet.Reported-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>Discussion:https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c564a@enterprisedb.com
1 parentef07d35 commit0012979

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

‎doc/src/sgml/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ html: html-stamp
144144

145145
html-stamp: stylesheet.xsl postgres-full.xml$(ALL_IMAGES)
146146
$(XSLTPROC)$(XMLINCLUDE)$(XSLTPROCFLAGS)$(XSLTPROC_HTML_FLAGS)$(wordlist 1,2,$^)
147-
cp$(ALL_IMAGES) html/
148147
cp$(srcdir)/stylesheet.css html/
149148
touch$@
150149

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,26 @@
101101
<xsl:apply-templatesselect="."mode="xref"/>
102102
</xsl:template>
103103

104+
105+
<!--
106+
Support for copying images to the output directory, so the output is self
107+
contained.
108+
-->
109+
<xsl:templatename="write-image">
110+
<xsl:variablename="input_filename">
111+
<xsl:value-ofselect="imagedata/@fileref"/>
112+
</xsl:variable>
113+
114+
<!-- references images directly, without images/-->
115+
<xsl:variablename="output_filename">
116+
<xsl:value-ofselect="concat($chunk.base.dir, substring-after($input_filename, '/'))"/>
117+
</xsl:variable>
118+
119+
<xsl:call-templatename="write.chunk">
120+
<xsl:with-paramname="filename"select="$output_filename"/>
121+
<xsl:with-paramname="content"select="document($input_filename)"/>
122+
</xsl:call-template>
123+
</xsl:template>
124+
125+
104126
</xsl:stylesheet>

‎doc/src/sgml/stylesheet.xsl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
</xsl:param>
3030

3131

32+
<!-- copy images to the output directory, so the output is self contained-->
33+
<xsl:templatematch="imageobject">
34+
<xsl:call-templatename="write-image"/>
35+
<xsl:apply-templatesselect="imagedata"/>
36+
</xsl:template>
37+
3238
<!-- strip directory name from image filerefs-->
3339
<xsl:templatematch="imagedata/@fileref">
3440
<xsl:value-ofselect="substring-after(., '/')"/>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp