Reorganize XSLT stylesheet support. Put common things into a separate
file (instead of repeating), add XSL-FO stylesheet and appropriate make rules.
This commit is contained in:
parent
0a265e487b
commit
5f1f30d136
@ -2,7 +2,7 @@
|
||||
#
|
||||
# PostgreSQL documentation makefile
|
||||
#
|
||||
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.82 2006/12/10 01:53:15 petere Exp $
|
||||
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.83 2006/12/10 16:01:06 petere Exp $
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@ -207,7 +207,7 @@ regress_README.html: regress.sgml
|
||||
|
||||
|
||||
##
|
||||
## Experimental XML stuff
|
||||
## XSLT processing
|
||||
##
|
||||
|
||||
OSX = osx # (may be called sx or sgml2xml on some systems)
|
||||
@ -219,11 +219,16 @@ postgres.xml: postgres.sgml $(GENERATED_SGML)
|
||||
-e '1a\' -e '<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">' \
|
||||
>$@
|
||||
|
||||
testxml: stylesheet.xsl postgres.xml
|
||||
$(XSLTPROC) $(XSLTPROCFLAGS) --stringparam pg.version '$(VERSION)' $^
|
||||
override XSLTPROCFLAGS += --stringparam pg.version '$(VERSION)'
|
||||
|
||||
xslthtml: stylesheet.xsl postgres.xml
|
||||
$(XSLTPROC) $(XSLTPROCFLAGS) $^
|
||||
|
||||
htmlhelp: stylesheet-hh.xsl postgres.xml
|
||||
$(XSLTPROC) $(XSLTPROCFLAGS) --stringparam pg.version '$(VERSION)' $^
|
||||
$(XSLTPROC) $(XSLTPROCFLAGS) $^
|
||||
|
||||
%.fo: stylesheet-fo.xsl %.xml
|
||||
$(XSLTPROC) $(XSLTPROCFLAGS) -o $@ $^
|
||||
|
||||
|
||||
##
|
||||
@ -271,7 +276,7 @@ clean distclean maintainer-clean:
|
||||
rm -f HTML.index $(GENERATED_SGML)
|
||||
# text
|
||||
rm -f INSTALL HISTORY regress_README
|
||||
# XML
|
||||
rm -f postgres.xml htmlhelp.hhp toc.hhc index.hhk
|
||||
# XSLT
|
||||
rm -f postgres.xml htmlhelp.hhp toc.hhc index.hhk *.fo
|
||||
# Texinfo
|
||||
rm -f *.texixml *.texi *.info db2texi.refs
|
||||
|
88
doc/src/sgml/stylesheet-common.xsl
Normal file
88
doc/src/sgml/stylesheet-common.xsl
Normal file
@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<!--
|
||||
This file contains XSLT stylesheet customizations that are common to
|
||||
all output formats (HTML, HTML Help, XSL-FO, etc.).
|
||||
-->
|
||||
|
||||
|
||||
<!-- Parameters -->
|
||||
|
||||
<xsl:param name="pg.fast" select="'0'"/>
|
||||
|
||||
<!--
|
||||
<xsl:param name="draft.mode">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($pg.version, 'devel')">yes</xsl:when>
|
||||
<xsl:otherwise>no</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
-->
|
||||
|
||||
<xsl:param name="show.comments">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($pg.version, 'devel')">1</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:param name="callout.graphics" select="'0'"></xsl:param>
|
||||
<xsl:param name="toc.section.depth">2</xsl:param>
|
||||
<xsl:param name="linenumbering.extension" select="'0'"></xsl:param>
|
||||
<xsl:param name="generate.index" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="preface.autolabel" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="section.autolabel" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="section.label.includes.component.label" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="refentry.xref.manvolnum" select="0"/>
|
||||
<xsl:param name="formal.procedures" select="0"></xsl:param>
|
||||
<xsl:param name="punct.honorific" select="''"></xsl:param>
|
||||
|
||||
|
||||
<!-- Change display of some elements -->
|
||||
|
||||
<xsl:template match="command">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="productname">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="structfield">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="structname">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="symbol">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="systemitem">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="token">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="type">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="programlisting/emphasis">
|
||||
<xsl:call-template name="inline.boldseq"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Special support for Tcl synopses -->
|
||||
|
||||
<xsl:template match="optional[@role='tcl']">
|
||||
?<xsl:call-template name="inline.charseq"/>?
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
9
doc/src/sgml/stylesheet-fo.xsl
Normal file
9
doc/src/sgml/stylesheet-fo.xsl
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
|
||||
<xsl:include href="stylesheet-common.xsl" />
|
||||
|
||||
</xsl:stylesheet>
|
@ -5,94 +5,21 @@
|
||||
exclude-result-prefixes="#default">
|
||||
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl"/>
|
||||
<xsl:include href="stylesheet-common.xsl" />
|
||||
|
||||
<!-- Parameters -->
|
||||
<xsl:param name="htmlhelp.use.hhk" select="'1'"/>
|
||||
<xsl:param name="pg.fast" select="'0'"/>
|
||||
|
||||
<!--
|
||||
<xsl:param name="draft.mode">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($pg.version, 'devel')">yes</xsl:when>
|
||||
<xsl:otherwise>no</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
-->
|
||||
|
||||
<xsl:param name="show.comments">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($pg.version, 'devel')">1</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
|
||||
|
||||
<xsl:param name="callout.graphics" select="'0'"></xsl:param>
|
||||
<xsl:param name="toc.section.depth">2</xsl:param>
|
||||
<xsl:param name="linenumbering.extension" select="'0'"></xsl:param>
|
||||
<xsl:param name="generate.index" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="preface.autolabel" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="section.autolabel" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="section.label.includes.component.label" select="1 - $pg.fast"></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>
|
||||
<xsl:param name="generate.legalnotice.link" select="1"></xsl:param>
|
||||
<xsl:param name="refentry.xref.manvolnum" select="0"/>
|
||||
<xsl:param name="link.mailto.url">pgsql-docs@postgresql.org</xsl:param>
|
||||
<xsl:param name="formal.procedures" select="0"></xsl:param>
|
||||
<xsl:param name="punct.honorific" select="''"></xsl:param>
|
||||
<xsl:param name="chunker.output.indent" select="'yes'"/>
|
||||
<xsl:param name="chunk.quietly" select="1"></xsl:param>
|
||||
|
||||
|
||||
<!-- Change display of some elements -->
|
||||
|
||||
<xsl:template match="command">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="productname">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="structfield">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="structname">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="symbol">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="systemitem">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="token">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="type">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="programlisting/emphasis">
|
||||
<xsl:call-template name="inline.boldseq"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Special support for Tcl synopses -->
|
||||
|
||||
<xsl:template match="optional[@role='tcl']">
|
||||
?<xsl:call-template name="inline.charseq"/>?
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!--
|
||||
Format multiple terms in varlistentry vertically, instead
|
||||
of comma-separated.
|
||||
|
@ -5,94 +5,20 @@
|
||||
exclude-result-prefixes="#default">
|
||||
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
|
||||
<xsl:include href="stylesheet-common.xsl" />
|
||||
|
||||
|
||||
<!-- Parameters -->
|
||||
|
||||
<xsl:param name="pg.fast" select="'0'"/>
|
||||
|
||||
<!--
|
||||
<xsl:param name="draft.mode">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($pg.version, 'devel')">yes</xsl:when>
|
||||
<xsl:otherwise>no</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
-->
|
||||
|
||||
<xsl:param name="show.comments">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($pg.version, 'devel')">1</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
|
||||
|
||||
<xsl:param name="callout.graphics" select="'0'"></xsl:param>
|
||||
<xsl:param name="toc.section.depth">2</xsl:param>
|
||||
<xsl:param name="linenumbering.extension" select="'0'"></xsl:param>
|
||||
<xsl:param name="generate.index" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="preface.autolabel" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="section.autolabel" select="1 - $pg.fast"></xsl:param>
|
||||
<xsl:param name="section.label.includes.component.label" select="1 - $pg.fast"></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>
|
||||
<xsl:param name="generate.legalnotice.link" select="1"></xsl:param>
|
||||
<xsl:param name="refentry.xref.manvolnum" select="0"/>
|
||||
<xsl:param name="link.mailto.url">pgsql-docs@postgresql.org</xsl:param>
|
||||
<xsl:param name="formal.procedures" select="0"></xsl:param>
|
||||
<xsl:param name="punct.honorific" select="''"></xsl:param>
|
||||
<xsl:param name="chunker.output.indent" select="'yes'"/>
|
||||
<xsl:param name="chunk.quietly" select="1"></xsl:param>
|
||||
|
||||
|
||||
<!-- Change display of some elements -->
|
||||
|
||||
<xsl:template match="command">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="productname">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="structfield">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="structname">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="symbol">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="systemitem">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="token">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="type">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="programlisting/emphasis">
|
||||
<xsl:call-template name="inline.boldseq"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Special support for Tcl synopses -->
|
||||
|
||||
<xsl:template match="optional[@role='tcl']">
|
||||
?<xsl:call-template name="inline.charseq"/>?
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!--
|
||||
Format multiple terms in varlistentry vertically, instead
|
||||
of comma-separated.
|
||||
|
Loading…
Reference in New Issue
Block a user