summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2004-01-13 18:45:19 +0000
committerPeter Eisentraut2004-01-13 18:45:19 +0000
commite27d50023545d4e0d385ca9ea955ff1d78c5d394 (patch)
tree5bacfd43d03a206460806f230be7474451a59cf4
parent5cecb734a76e01b5d75cfcbfb95e2a244b2e96a8 (diff)
Make rule and stylesheet to try out XSLT for DocBook processing
-rw-r--r--doc/src/sgml/Makefile16
-rw-r--r--doc/src/sgml/stylesheet.xsl70
2 files changed, 85 insertions, 1 deletions
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index c8c00651e7e..64f57814ad8 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -2,7 +2,7 @@
#
# PostgreSQL documentation makefile
#
-# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.62 2003/12/15 22:24:59 momjian Exp $
+# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.63 2004/01/13 18:45:19 petere Exp $
#
#----------------------------------------------------------------------------
@@ -198,6 +198,20 @@ regress_README.html: regress.sgml
##
+## Experimental XML stuff
+##
+
+OSX = osx # (may be called sx or sgml2xml on some systems)
+XSLTPROC = xsltproc
+
+postgres.xml: postgres.sgml $(GENERATED_SGML)
+ $(OSX) -x lower $< >$@
+
+testxml: stylesheet.xsl postgres.xml
+ $(XSLTPROC) $^
+
+
+##
## Check
##
diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
new file mode 100644
index 00000000000..3301afd617b
--- /dev/null
+++ b/doc/src/sgml/stylesheet.xsl
@@ -0,0 +1,70 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default">
+
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/snapshot/html/chunk.xsl"/>
+
+<!-- Parameters -->
+
+<xsl:param name="autotoc.label.separator" select="'. '"/>
+<xsl:param name="callout.graphics" select="'0'"></xsl:param>
+<xsl:param name="toc.section.depth">3</xsl:param>
+<xsl:param name="linenumbering.extension" select="'0'"></xsl:param>
+<xsl:param name="preface.autolabel" select="1"></xsl:param>
+<xsl:param name="section.autolabel" select="1"></xsl:param>
+<xsl:param name="section.label.includes.component.label" select="1"></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="0"></xsl:param> <!-- ? -->
+<xsl:param name="generate.legalnotice.link" select="1"></xsl:param>
+<xsl:param name="link.mailto.url">[email protected]</xsl:param>
+<xsl:param name="formal.procedures" select="0"></xsl:param>
+<xsl:param name="punct.honorific" select="''"></xsl:param>
+<xsl:param name="chunker.output.doctype-public" select="''"/> <!-- ? -->
+<xsl:param name="chunker.output.indent" select="'no'"/> <!-- ? -->
+<xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/>
+<xsl:param name="html.extra.head.links" select="0"></xsl:param>
+<xsl:param name="chunk.quietly" select="0"></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>
+
+</xsl:stylesheet>