summaryrefslogtreecommitdiffstats
path: root/docbook
diff options
context:
space:
mode:
Diffstat (limited to 'docbook')
-rw-r--r--docbook/fixhtml.xsl26
-rw-r--r--docbook/manpage.css10
-rw-r--r--docbook/manpages.xsl55
-rwxr-xr-xdocbook/sgml2html20
-rwxr-xr-xdocbook/sgml2man29
5 files changed, 140 insertions, 0 deletions
diff --git a/docbook/fixhtml.xsl b/docbook/fixhtml.xsl
new file mode 100644
index 0000000..6089af4
--- /dev/null
+++ b/docbook/fixhtml.xsl
@@ -0,0 +1,26 @@
+<?xml version='1.0'?>
+<xsl:stylesheet
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Zap empty <a> nodes -->
+
+<xsl:template match="xhtml:a">
+
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ <xsl:if test="count(child::node()) = 0">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:copy>
+
+</xsl:template>
+
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet>
diff --git a/docbook/manpage.css b/docbook/manpage.css
new file mode 100644
index 0000000..8936c25
--- /dev/null
+++ b/docbook/manpage.css
@@ -0,0 +1,10 @@
+body { margin-top: 0px; margin-bottom: 0px; background-image: url(bg.gif); font-family: times new roman,serif; color: #000000;}
+
+a { color: #0000FF; }
+a:visited { color: #880000; }
+a:hover { color: #000000 }
+
+h1 { font-family: arial,helvetica,sans serif; font-size: 200% }
+h2 { font-family: arial,helvetica,sans serif; font-size: 150% }
+
+ul li { padding-top: 5px; }
diff --git a/docbook/manpages.xsl b/docbook/manpages.xsl
new file mode 100644
index 0000000..3d378d4
--- /dev/null
+++ b/docbook/manpages.xsl
@@ -0,0 +1,55 @@
+<?xml version='1.0'?>
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="/usr/share/sgml/docbook/xsl-stylesheets/xhtml/onechunk.xsl"/>
+
+<xsl:param name="html.stylesheet" select="'style.css'"/>
+<xsl:param name="admon.graphics" select="0"/>
+
+<xsl:param name="use.id.as.filename" select="1"/>
+
+<xsl:param name="funcsynopsis.style">ansi</xsl:param>
+
+<xsl:param name="table.borders.with.css" select="1" />
+
+<xsl:param name="default.table.frame" select="'collapse'" />
+<xsl:param name="table.cell.border.style" select="''" />
+<xsl:param name="table.cell.border.thickness" select="''" />
+<xsl:param name="table.cell.border.color" select="''" />
+<xsl:param name="emphasis.propagates.style" select="1" />
+<xsl:param name="para.propagates.style" select="1" />
+<xsl:param name="entry.propagates.style" select="1" />
+
+<xsl:param name="part.autolabel" select="0" />
+<xsl:param name="section.autolabel" select="0" />
+<xsl:param name="chapter.autolabel" select="0" />
+
+<xsl:template name="user.head.content">
+
+ <link rel='stylesheet' type='text/css' href='manpage.css' />
+ <meta name="MSSmartTagsPreventParsing" content="TRUE" />
+ <link rel="icon" href="icon.gif" type="image/gif" />
+ <xsl:comment>
+
+Copyright 1998 - 2009 Double Precision, Inc. See COPYING for distribution
+information.
+
+</xsl:comment>
+</xsl:template>
+
+<!-- Bug fix 1.76.1 -->
+<xsl:template match="funcdef/function" mode="ansi-tabular">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <strong xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates mode="ansi-nontabular"/></strong>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="kr-tabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/docbook/sgml2html b/docbook/sgml2html
new file mode 100755
index 0000000..6040700
--- /dev/null
+++ b/docbook/sgml2html
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# Copyright 2001-2002 Double Precision, Inc. See COPYING for
+# distribution information.
+
+srcfile="$1"
+dstfile="$2"
+
+if test ! -f $srcfile
+then
+ echo "$srcfile: not found" >&2
+ exit 1
+fi
+
+rm -rf $dstfile.tmp
+mkdir $dstfile.tmp
+xsltproc -o $dstfile.tmp/ `dirname $0`/manpages.xsl $srcfile || exit 1
+xsltproc `dirname $0`/fixhtml.xsl $dstfile.tmp/* >$dstfile.tmp2 || exit 1
+rm -rf $dstfile.tmp
+mv $dstfile.tmp2 $dstfile || exit 1
diff --git a/docbook/sgml2man b/docbook/sgml2man
new file mode 100755
index 0000000..a7f71e2
--- /dev/null
+++ b/docbook/sgml2man
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright 2001-2002 Double Precision, Inc. See COPYING for
+# distribution information.
+
+srcfile="$1"
+dstfile="$2"
+
+if test ! -f $srcfile
+then
+ echo "$srcfile: not found" >&2
+ exit 1
+fi
+
+rm -rf $dstfile.tmpdir
+mkdir -p $dstfile.tmpdir
+xsltproc --nonet -o $dstfile.tmpdir/ /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl $srcfile
+
+for f in $dstfile.tmpdir/*
+do
+ sed -n '1p' <$f >$dstfile.tmp
+ sed -n '20,$d;/<!--/p' <$srcfile | sed 's/\"/ /g;s/^/\.\\\"/g' >>$dstfile.tmp || exit 1
+
+ sed '1d' <$f >>$dstfile.tmp || exit 1
+ mv $dstfile.tmp `basename $f` || exit 1
+done
+
+rm -rf $dstfile.tmpdir
+#`dirname $0`/fixman "$srcfile" "$dstfile"