mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
docs: html: copy images to output as part of xslt build
Until now the meson built HTML docs had non-working references to images. They were copied in the make target. Instead of duplicating that for meson, copy them 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
This commit is contained in:
@ -101,4 +101,26 @@
|
||||
<xsl:apply-templates select="." mode="xref"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!--
|
||||
Support for copying images to the output directory, so the output is self
|
||||
contained.
|
||||
-->
|
||||
<xsl:template name="write-image">
|
||||
<xsl:variable name="input_filename">
|
||||
<xsl:value-of select="imagedata/@fileref"/>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- references images directly, without images/ -->
|
||||
<xsl:variable name="output_filename">
|
||||
<xsl:value-of select="concat($chunk.base.dir, substring-after($input_filename, '/'))"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="write.chunk">
|
||||
<xsl:with-param name="filename" select="$output_filename"/>
|
||||
<xsl:with-param name="content" select="document($input_filename)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
Reference in New Issue
Block a user