From 5f1f30d136fe8b1c2a403efd0441ff0160df0dcb Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 10 Dec 2006 16:01:06 +0000 Subject: [PATCH] Reorganize XSLT stylesheet support. Put common things into a separate file (instead of repeating), add XSL-FO stylesheet and appropriate make rules. --- doc/src/sgml/Makefile | 19 ++++--- doc/src/sgml/stylesheet-common.xsl | 88 ++++++++++++++++++++++++++++++ doc/src/sgml/stylesheet-fo.xsl | 9 +++ doc/src/sgml/stylesheet-hh.xsl | 75 +------------------------ doc/src/sgml/stylesheet.xsl | 78 +------------------------- 5 files changed, 112 insertions(+), 157 deletions(-) create mode 100644 doc/src/sgml/stylesheet-common.xsl create mode 100644 doc/src/sgml/stylesheet-fo.xsl diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 58e9a7d049..c60dcf272a 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.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 '' \ >$@ -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 diff --git a/doc/src/sgml/stylesheet-common.xsl b/doc/src/sgml/stylesheet-common.xsl new file mode 100644 index 0000000000..2ad0a7f1ca --- /dev/null +++ b/doc/src/sgml/stylesheet-common.xsl @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + 1 + 0 + + + + +2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ?? + + + diff --git a/doc/src/sgml/stylesheet-fo.xsl b/doc/src/sgml/stylesheet-fo.xsl new file mode 100644 index 0000000000..d982a3c46a --- /dev/null +++ b/doc/src/sgml/stylesheet-fo.xsl @@ -0,0 +1,9 @@ + + + + + + + diff --git a/doc/src/sgml/stylesheet-hh.xsl b/doc/src/sgml/stylesheet-hh.xsl index 6b1e7025a0..1c50518c70 100644 --- a/doc/src/sgml/stylesheet-hh.xsl +++ b/doc/src/sgml/stylesheet-hh.xsl @@ -5,94 +5,21 @@ exclude-result-prefixes="#default"> + - - - - - - 1 - 0 - - - - - -2 - - - - - - pgsql-docs@postgresql.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ?? - - - - - - - - - - 1 - 0 - - - - - -2 - - - - - + - pgsql-docs@postgresql.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ?? - - -