doc: Allow selecting web site CSS style sheet in XSLT HTML build

This commit is contained in:
Peter Eisentraut 2013-11-28 22:45:08 -05:00
parent 8e18d04d4d
commit 384eb1d40d
2 changed files with 13 additions and 1 deletions

View File

@ -258,6 +258,10 @@ postgres.xml: $(srcdir)/postgres.sgml $(ALMOSTALLSGML)
rm postgres.xmltmp
# ' hello Emacs
ifeq ($(STYLE),website)
XSLTPROC_HTML_FLAGS += --param website.stylesheet 1
endif
xslthtml: xslthtml-stamp
xslthtml-stamp: stylesheet.xsl postgres.xml

View File

@ -10,7 +10,6 @@
<!-- Parameters -->
<xsl:param name="base.dir" select="'html/'"></xsl:param>
<xsl:param name="html.stylesheet" select="'stylesheet.css'"></xsl:param>
<xsl:param name="use.id.as.filename" select="'1'"></xsl:param>
<xsl:param name="make.valid.html" select="1"></xsl:param>
<xsl:param name="generate.id.attributes" select="1"></xsl:param>
@ -21,6 +20,15 @@
<xsl:param name="chunk.quietly" select="1"></xsl:param>
<xsl:param name="toc.max.depth">2</xsl:param>
<xsl:param name="website.stylesheet" select="0"/>
<xsl:param name="html.stylesheet">
<xsl:choose>
<xsl:when test="$website.stylesheet = 0">stylesheet.css</xsl:when>
<xsl:otherwise>http://www.postgresql.org/media/css/docs.css</xsl:otherwise>
</xsl:choose>
</xsl:param>
<!-- Change display of some elements -->