Skip to content

Commit e27d500

Browse files
committed
Make rule and stylesheet to try out XSLT for DocBook processing
1 parent 5cecb73 commit e27d500

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed

doc/src/sgml/Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# PostgreSQL documentation makefile
44
#
5-
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.62 2003/12/15 22:24:59 momjian Exp $
5+
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.63 2004/01/13 18:45:19 petere Exp $
66
#
77
#----------------------------------------------------------------------------
88

@@ -197,6 +197,20 @@ regress_README.html: regress.sgml
197197
rm tempfile_regress_README.sgml
198198

199199

200+
##
201+
## Experimental XML stuff
202+
##
203+
204+
OSX = osx # (may be called sx or sgml2xml on some systems)
205+
XSLTPROC = xsltproc
206+
207+
postgres.xml: postgres.sgml $(GENERATED_SGML)
208+
$(OSX) -x lower $< >$@
209+
210+
testxml: stylesheet.xsl postgres.xml
211+
$(XSLTPROC) $^
212+
213+
200214
##
201215
## Check
202216
##

doc/src/sgml/stylesheet.xsl

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version='1.0'?>
2+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3+
version='1.0'
4+
xmlns="http://www.w3.org/TR/xhtml1/transitional"
5+
exclude-result-prefixes="#default">
6+
7+
<xsl:import href="http://docbook.sourceforge.net/release/xsl/snapshot/html/chunk.xsl"/>
8+
9+
<!-- Parameters -->
10+
11+
<xsl:param name="autotoc.label.separator" select="'. '"/>
12+
<xsl:param name="callout.graphics" select="'0'"></xsl:param>
13+
<xsl:param name="toc.section.depth">3</xsl:param>
14+
<xsl:param name="linenumbering.extension" select="'0'"></xsl:param>
15+
<xsl:param name="preface.autolabel" select="1"></xsl:param>
16+
<xsl:param name="section.autolabel" select="1"></xsl:param>
17+
<xsl:param name="section.label.includes.component.label" select="1"></xsl:param>
18+
<xsl:param name="html.stylesheet" select="'stylesheet.css'"></xsl:param>
19+
<xsl:param name="use.id.as.filename" select="'1'"></xsl:param>
20+
<xsl:param name="make.valid.html" select="1"></xsl:param>
21+
<xsl:param name="generate.id.attributes" select="0"></xsl:param> <!-- ? -->
22+
<xsl:param name="generate.legalnotice.link" select="1"></xsl:param>
23+
<xsl:param name="link.mailto.url">pgsql-docs@postgresql.org</xsl:param>
24+
<xsl:param name="formal.procedures" select="0"></xsl:param>
25+
<xsl:param name="punct.honorific" select="''"></xsl:param>
26+
<xsl:param name="chunker.output.doctype-public" select="''"/> <!-- ? -->
27+
<xsl:param name="chunker.output.indent" select="'no'"/> <!-- ? -->
28+
<xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/>
29+
<xsl:param name="html.extra.head.links" select="0"></xsl:param>
30+
<xsl:param name="chunk.quietly" select="0"></xsl:param>
31+
32+
<!-- Change display of some elements -->
33+
34+
<xsl:template match="command">
35+
<xsl:call-template name="inline.monoseq"/>
36+
</xsl:template>
37+
38+
<xsl:template match="productname">
39+
<xsl:call-template name="inline.charseq"/>
40+
</xsl:template>
41+
42+
<xsl:template match="structfield">
43+
<xsl:call-template name="inline.monoseq"/>
44+
</xsl:template>
45+
46+
<xsl:template match="structname">
47+
<xsl:call-template name="inline.monoseq"/>
48+
</xsl:template>
49+
50+
<xsl:template match="symbol">
51+
<xsl:call-template name="inline.monoseq"/>
52+
</xsl:template>
53+
54+
<xsl:template match="systemitem">
55+
<xsl:call-template name="inline.charseq"/>
56+
</xsl:template>
57+
58+
<xsl:template match="token">
59+
<xsl:call-template name="inline.monoseq"/>
60+
</xsl:template>
61+
62+
<xsl:template match="type">
63+
<xsl:call-template name="inline.monoseq"/>
64+
</xsl:template>
65+
66+
<xsl:template match="programlisting/emphasis">
67+
<xsl:call-template name="inline.boldseq"/>
68+
</xsl:template>
69+
70+
</xsl:stylesheet>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy