summaryrefslogtreecommitdiffstats
path: root/doc/xsl
diff options
context:
space:
mode:
Diffstat (limited to 'doc/xsl')
-rw-r--r--doc/xsl/Makefile.in28
-rw-r--r--doc/xsl/copyright.xsl75
-rw-r--r--doc/xsl/isc-docbook-chunk.xsl.in65
-rw-r--r--doc/xsl/isc-docbook-html.xsl.in58
-rw-r--r--doc/xsl/isc-docbook-latex-mappings.xml37
-rw-r--r--doc/xsl/isc-docbook-latex.xsl.in166
-rw-r--r--doc/xsl/isc-docbook-text.xsl50
-rw-r--r--doc/xsl/isc-manpage.xsl.in145
-rw-r--r--doc/xsl/pre-latex.xsl55
9 files changed, 679 insertions, 0 deletions
diff --git a/doc/xsl/Makefile.in b/doc/xsl/Makefile.in
new file mode 100644
index 0000000..30c1c61
--- /dev/null
+++ b/doc/xsl/Makefile.in
@@ -0,0 +1,28 @@
+# Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+# $Id: Makefile.in,v 1.4 2007/06/19 23:47:13 tbox Exp $
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+top_srcdir = @top_srcdir@
+
+SUBDIRS =
+TARGETS =
+
+@BIND9_MAKE_RULES@
+
+distclean::
+ rm -f isc-docbook-chunk.xsl isc-docbook-html.xsl \
+ isc-docbook-latex.xsl isc-manpage.xsl
diff --git a/doc/xsl/copyright.xsl b/doc/xsl/copyright.xsl
new file mode 100644
index 0000000..691cde2
--- /dev/null
+++ b/doc/xsl/copyright.xsl
@@ -0,0 +1,75 @@
+<!--
+ - Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ -
+ - Permission to use, copy, modify, and/or distribute this software for any
+ - purpose with or without fee is hereby granted, provided that the above
+ - copyright notice and this permission notice appear in all copies.
+ -
+ - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id: copyright.xsl,v 1.6 2007/06/19 23:47:13 tbox Exp $ -->
+
+<!-- Generate ISC copyright comments from Docbook copyright metadata. -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:template name="isc.copyright.format">
+ <xsl:param name="text"/>
+ <xsl:value-of select="$isc.copyright.leader"/>
+ <xsl:value-of select="normalize-space(substring-before($text, '&#10;'))"/>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:variable name="rest" select="substring-after($text, '&#10;')"/>
+ <xsl:if test="translate($rest, '&#9;&#32;', '')">
+ <xsl:call-template name="isc.copyright.format">
+ <xsl:with-param name="text" select="$rest"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:variable name="isc.copyright.text">
+ <xsl:text>
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+ </xsl:text>
+ </xsl:variable>
+
+ <xsl:variable name="isc.copyright">
+ <xsl:call-template name="isc.copyright.format">
+ <xsl:with-param name="text">
+ <xsl:for-each select="/refentry/docinfo/copyright | /book/bookinfo/copyright">
+ <xsl:text>Copyright (C) </xsl:text>
+ <xsl:call-template name="copyright.years">
+ <xsl:with-param name="years" select="year"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="holder"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:for-each>
+ <xsl:value-of select="$isc.copyright.text"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+</xsl:stylesheet>
+
+<!--
+ - Local variables:
+ - mode: sgml
+ - End:
+ -->
diff --git a/doc/xsl/isc-docbook-chunk.xsl.in b/doc/xsl/isc-docbook-chunk.xsl.in
new file mode 100644
index 0000000..a766c05
--- /dev/null
+++ b/doc/xsl/isc-docbook-chunk.xsl.in
@@ -0,0 +1,65 @@
+<!--
+ - Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ -
+ - Permission to use, copy, modify, and/or distribute this software for any
+ - purpose with or without fee is hereby granted, provided that the above
+ - copyright notice and this permission notice appear in all copies.
+ -
+ - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id: isc-docbook-chunk.xsl.in,v 1.6 2007/06/19 23:47:13 tbox Exp $ -->
+
+<!-- ISC customizations for Docbook-XSL chunked HTML generator -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <!-- Import the Docbook HTML stuff -->
+ <xsl:import href="@XSLT_DOCBOOK_CHUNK_HTML@"/>
+
+ <!-- Readable HTML output, please -->
+ <xsl:output indent="yes"/>
+ <xsl:param name="chunker.output.indent" select="'yes'"/>
+
+ <!-- Chunk at section level, please -->
+ <xsl:param name="chunk.section.depth" select="0"/>
+
+ <!-- Generate chunk filenames from id attribute values -->
+ <xsl:param name="use.id.as.filename" select="1"/>
+
+ <!-- ANSI C function prototypes, please -->
+ <xsl:param name="funcsynopsis.style">ansi</xsl:param>
+
+ <!-- Use ranges when constructing copyrights -->
+ <xsl:param name="make.year.ranges" select="1"/>
+
+ <!-- Include our copyright generator -->
+ <xsl:include href="copyright.xsl"/>
+
+ <!-- Set comment convention for this output format -->
+ <xsl:param name="isc.copyright.leader"> - </xsl:param>
+
+ <!-- Override Docbook template to insert copyright -->
+ <xsl:template name="user.preroot">
+ <xsl:comment>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:value-of select="$isc.copyright"/>
+ </xsl:comment>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:comment> &#36;Id&#36; </xsl:comment>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
+
+<!--
+ - Local variables:
+ - mode: sgml
+ - End:
+ -->
diff --git a/doc/xsl/isc-docbook-html.xsl.in b/doc/xsl/isc-docbook-html.xsl.in
new file mode 100644
index 0000000..ecc0f67
--- /dev/null
+++ b/doc/xsl/isc-docbook-html.xsl.in
@@ -0,0 +1,58 @@
+<!--
+ - Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ -
+ - Permission to use, copy, modify, and/or distribute this software for any
+ - purpose with or without fee is hereby granted, provided that the above
+ - copyright notice and this permission notice appear in all copies.
+ -
+ - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id: isc-docbook-html.xsl.in,v 1.6 2007/06/19 23:47:13 tbox Exp $ -->
+
+<!-- ISC customizations for Docbook-XSL HTML generator -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <!-- Import the Docbook HTML stuff -->
+ <xsl:import href="@XSLT_DOCBOOK_STYLE_HTML@"/>
+
+ <!-- Readable HTML output, please -->
+ <xsl:output indent="yes"/>
+
+ <!-- ANSI C function prototypes, please -->
+ <xsl:param name="funcsynopsis.style">ansi</xsl:param>
+
+ <!-- Use ranges when constructing copyrights -->
+ <xsl:param name="make.year.ranges" select="1"/>
+
+ <!-- Include our copyright generator -->
+ <xsl:include href="copyright.xsl"/>
+
+ <!-- Set comment convention for this output format -->
+ <xsl:param name="isc.copyright.leader"> - </xsl:param>
+
+ <!-- Override Docbook template to insert copyright -->
+ <xsl:template name="user.preroot">
+ <xsl:comment>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:value-of select="$isc.copyright"/>
+ </xsl:comment>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:comment> &#36;Id&#36; </xsl:comment>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
+
+<!--
+ - Local variables:
+ - mode: sgml
+ - End:
+ -->
diff --git a/doc/xsl/isc-docbook-latex-mappings.xml b/doc/xsl/isc-docbook-latex-mappings.xml
new file mode 100644
index 0000000..97c7cef
--- /dev/null
+++ b/doc/xsl/isc-docbook-latex-mappings.xml
@@ -0,0 +1,37 @@
+<!--
+ - Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ -
+ - Permission to use, copy, modify, and/or distribute this software for any
+ - purpose with or without fee is hereby granted, provided that the above
+ - copyright notice and this permission notice appear in all copies.
+ -
+ - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id: isc-docbook-latex-mappings.xml,v 1.4 2007/06/19 23:47:13 tbox Exp $ -->
+
+<!--
+ - ISC modifications to db2latex mapping rules.
+ -
+ - We want <refentry/> elements to show up in the table of contents,
+ - so we need to generate \section{}, not \section*{}.
+ -->
+
+<latexbindings>
+ <latexmapping role="begin">
+ <mapping key="refentry" text="">
+ <line>% &#10;</line>
+ <line>% -------------------------------------------------------------&#10;</line>
+ <line>% Refentry &#10;</line>
+ <line>% -------------------------------------------------------------&#10;</line>
+ <line>\section{%title%}&#10;</line>
+ <line>\label{%id%}\hypertarget{%id%}{}%&#10;</line>
+ </mapping>
+ </latexmapping>
+</latexbindings>
diff --git a/doc/xsl/isc-docbook-latex.xsl.in b/doc/xsl/isc-docbook-latex.xsl.in
new file mode 100644
index 0000000..1cfcc99
--- /dev/null
+++ b/doc/xsl/isc-docbook-latex.xsl.in
@@ -0,0 +1,166 @@
+<!--
+ - Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ -
+ - Permission to use, copy, modify, and/or distribute this software for any
+ - purpose with or without fee is hereby granted, provided that the above
+ - copyright notice and this permission notice appear in all copies.
+ -
+ - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id: isc-docbook-latex.xsl.in,v 1.6 2007/06/19 23:47:13 tbox Exp $ -->
+
+<!-- ISC customizations for db2latex generator -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <!-- Import the db2latex stuff -->
+ <xsl:import href="@XSLT_DB2LATEX_STYLE@"/>
+
+ <!-- Blank lines between paragraphs, please -->
+ <xsl:param name="latex.use.parskip" select="1"/>
+
+ <!-- Least bad current option for constructing tables -->
+ <xsl:param name="latex.use.ltxtable" select="1"/>
+ <xsl:param name="latex.use.longtable" select="1"/>
+
+ <!-- LaTeX2e documentclass options. -->
+ <xsl:param name="latex.documentclass.common"/>
+ <xsl:param name="latex.documentclass.book">10pt,twoside,openright</xsl:param>
+
+ <!-- This documentation is in English (or maybe Bad English) -->
+ <xsl:param name="latex.babel.language" select="'english'"/>
+ <xsl:param name="l10n.gentext.default.language" select="'en'"/>
+
+ <!-- Where to find "admonition" graphics -->
+ <xsl:param name="admon.graphics.path" select="'@XSLT_DB2LATEX_ADMONITIONS@'"/>
+
+ <!-- ANSI C function prototypes, please -->
+ <xsl:param name="funcsynopsis.style">ansi</xsl:param>
+
+ <!-- Local modifications to db2latex's mapping rules -->
+ <xsl:param name="latex.mapping.xml" select="document('isc-docbook-latex-mappings.xml')"/>
+
+ <!-- Patch around db2latex (0.8pre1) bug -->
+ <xsl:template match="copyright/year">
+ <xsl:apply-templates />
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Include our copyright generator -->
+ <xsl:include href="copyright.xsl"/>
+
+ <!-- Set comment convention for this output format -->
+ <xsl:param name="isc.copyright.leader">% </xsl:param>
+
+ <!-- Intercept top level to prepend copyright -->
+ <xsl:template match="/">
+ <xsl:value-of select="$isc.copyright"/>
+ <xsl:apply-imports/>
+ </xsl:template>
+
+ <!--
+ - Add support for multiple <para/> elements in a table entry.
+ - db2latex is already typesetting the table entry as a parbox,
+ - so we just have to insert the paragraph breaks.
+ -->
+ <xsl:template match="tbody/row/entry/para[position() != last()]">
+ <xsl:apply-imports/>
+ <xsl:text> \par </xsl:text>
+ </xsl:template>
+
+ <!--
+ - Add support for <optional/> in <programlisting/>.
+ -->
+ <xsl:template match="optional" mode="latex.verbatim">
+ <xsl:text>[</xsl:text>
+ <xsl:apply-templates mode="latex.verbatim"/>
+ <xsl:text>]</xsl:text>
+ </xsl:template>
+
+ <!--
+ - Customize the title page. Are we having fun yet?
+ -
+ - NB: filename of graphic specified without extension.
+ - LaTeX includes file.eps, PDFLaTeX includes file.pdf.
+ -
+ - Spacing and font sizes could probably use some work.
+ -->
+ <xsl:param name="latex.maketitle">
+ <xsl:text>
+ \begin{titlepage}
+ \null\vfil
+ \vskip 60pt
+ \begin{center}%
+ { %\LARGE
+ \Huge
+ \bfseries
+ </xsl:text>
+ <xsl:for-each select="/book/title">
+ <xsl:call-template name="text"/>
+ </xsl:for-each>
+ <xsl:text>
+ \par}%
+ \vskip 3em%
+ { %\large
+ \Large
+ \lineskip .75em%
+ </xsl:text>
+ <xsl:for-each select="/book/bookinfo/releaseinfo[1]">
+ <xsl:call-template name="text"/>
+ </xsl:for-each>
+ <xsl:text>
+ \par}
+ %\vskip 1.5em%
+ \vfil
+ \includegraphics{isc-logo}
+ \end{center}\par
+ \vfil\null
+ \end{titlepage}
+ </xsl:text>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:param>
+
+ <!--
+ - More front matter: copyright notice, CVS revision number, table
+ - of contents.
+ -->
+ <xsl:template match="book/bookinfo">
+ <xsl:apply-imports/>
+ <xsl:text>\begin{center}&#10;</xsl:text>
+ <xsl:value-of select="$isc.copyright.text"/>
+ <xsl:text>\end{center}&#10;</xsl:text>
+ <xsl:for-each select="/book/bookinfo/releaseinfo[position() &gt; 1]">
+ <xsl:text>\begin{center}</xsl:text>
+ <xsl:call-template name="text"/>
+ <xsl:text>\end{center}&#10;</xsl:text>
+ </xsl:for-each>
+ <xsl:text>\tableofcontents&#10;</xsl:text>
+ </xsl:template>
+
+ <!--
+ - Try to avoid some weird looking line breaks.
+ -
+ - This doesn't really work right, so disable for now.
+ -->
+ <xsl:template match="literal" mode="disabled">
+ <xsl:text>\mbox{</xsl:text>
+ <xsl:apply-imports/>
+ <xsl:text>}</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
+
+<!--
+ - Local variables:
+ - mode: sgml
+ - End:
+ -->
diff --git a/doc/xsl/isc-docbook-text.xsl b/doc/xsl/isc-docbook-text.xsl
new file mode 100644
index 0000000..abca9ea
--- /dev/null
+++ b/doc/xsl/isc-docbook-text.xsl
@@ -0,0 +1,50 @@
+<!--
+ - Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ -
+ - Permission to use, copy, modify, and/or distribute this software for any
+ - purpose with or without fee is hereby granted, provided that the above
+ - copyright notice and this permission notice appear in all copies.
+ -
+ - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id: isc-docbook-text.xsl,v 1.3 2007/06/19 23:47:13 tbox Exp $ -->
+
+<!-- Tweaks to Docbook-XSL HTML for producing flat ASCII text. -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+
+ <!-- Import our Docbook HTML stuff -->
+ <xsl:import href="isc-docbook-html.xsl"/>
+
+ <!-- Disable tables of contents (for now - tweak as needed) -->
+ <xsl:param name="generate.toc"/>
+
+ <!-- Voodoo to read i18n/l10n overrides directly from this stylesheet -->
+ <xsl:param name="local.l10n.xml" select="document('')"/>
+
+ <!-- Customize Docbook-XSL i18n/l10n mappings. -->
+ <l:i18n>
+ <l:l10n language="en" english-language-name="English">
+
+ <!-- Please use plain old ASCII quotes -->
+ <l:dingbat key="startquote" text='&quot;'/>
+ <l:dingbat key="endquote" text='&quot;'/>
+
+ </l:l10n>
+ </l:i18n>
+
+</xsl:stylesheet>
+
+<!--
+ - Local variables:
+ - mode: sgml
+ - End:
+ -->
diff --git a/doc/xsl/isc-manpage.xsl.in b/doc/xsl/isc-manpage.xsl.in
new file mode 100644
index 0000000..fe008d3
--- /dev/null
+++ b/doc/xsl/isc-manpage.xsl.in
@@ -0,0 +1,145 @@
+<!--
+ - Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ -
+ - Permission to use, copy, modify, and/or distribute this software for any
+ - purpose with or without fee is hereby granted, provided that the above
+ - copyright notice and this permission notice appear in all copies.
+ -
+ - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id: isc-manpage.xsl.in,v 1.9 2007/06/18 23:47:34 tbox Exp $ -->
+
+<!-- ISC customizations for Docbook-XSL manual page generator. -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <!-- Import the Docbook manpages stuff -->
+ <xsl:import href="@XSLT_DOCBOOK_STYLE_MAN@"/>
+
+ <!-- Include our copyright generator -->
+ <xsl:include href="copyright.xsl"/>
+
+ <!-- Set comment string for this output format -->
+ <xsl:param name="isc.copyright.leader">.\" </xsl:param>
+
+ <!-- We're not writing any kind of SGML, thanks -->
+ <xsl:output method="text" encoding="us-ascii"/>
+
+ <!-- ANSI C function prototypes, please -->
+ <xsl:param name="funcsynopsis.style">ansi</xsl:param>
+
+ <!-- Use ranges when constructing copyrights -->
+ <xsl:param name="make.year.ranges" select="1"/>
+
+ <!-- Stuff we want in our nroff preamble. -->
+ <xsl:variable name="isc.nroff.preamble">
+ <xsl:text>.\"&#10;</xsl:text>
+ <xsl:text>.\" &#36;Id&#36;&#10;</xsl:text>
+ <xsl:text>.\"&#10;</xsl:text>
+ <xsl:text>.hy 0&#10;</xsl:text>
+ <xsl:text>.ad l&#10;</xsl:text>
+ </xsl:variable>
+
+ <!--
+ - Override Docbook template to insert our copyright,
+ - disable chunking, and suppress output of .so files.
+ -->
+ <xsl:template name="write.text.chunk">
+ <xsl:param name="content"/>
+ <xsl:if test="substring($content, 1, 4) != '.so ' or
+ substring-after($content, '&#10;') != ''">
+ <xsl:call-template name="isc.no.blanks">
+ <xsl:with-param name="text" select="
+ concat($isc.copyright,
+ $isc.nroff.preamble,
+ $content)"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <!--
+ - Suppress blank lines in nroff source we output.
+ -->
+ <xsl:template name="isc.no.blanks">
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="contains($text, '&#10;')">
+ <xsl:call-template name="isc.no.blanks">
+ <xsl:with-param name="text"
+ select="substring-before($text, '&#10;')"/>
+ </xsl:call-template>
+ <xsl:call-template name="isc.no.blanks">
+ <xsl:with-param name="text"
+ select="substring-after($text, '&#10;')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="translate($text, '&#9;&#32;', '')">
+ <xsl:value-of select="$text"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+ <!--
+ - Override Docbook template to change formatting.
+ - We just want the element name in boldface, no subsection header.
+ -->
+ <xsl:template match="caution|important|note|tip|warning">
+ <xsl:text>&#10;.RS&#10;.B "</xsl:text>
+ <!-- capitalize word -->
+ <xsl:value-of
+ select="translate (substring (name(.), 1, 1), 'cintw', 'CINTW')" />
+ <xsl:value-of select="substring (name(), 2)" />
+ <xsl:if test="title">
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="title[1]"/>
+ </xsl:if>
+ <xsl:text>:"&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.RE&#10;</xsl:text>
+ </xsl:template>
+
+ <!--
+ - Override template to change formatting.
+ - We don't want hyphenation or justification.
+ -->
+ <xsl:template match="cmdsynopsis">
+ <xsl:text>.HP </xsl:text>
+ <xsl:value-of select="string-length (normalize-space (command)) + 1"/>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:template>
+
+ <!--
+ - Override template to change formatting.
+ - We don't want hyphenation or justification.
+ -->
+ <xsl:template match="funcsynopsis">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!--
+ - Override template to change formatting.
+ - Line breaks in funcsynopsisinfo are significant.
+ -->
+ <xsl:template match="funcsynopsisinfo">
+ <xsl:text>&#10;.nf&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.fi&#10;</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
+
+<!--
+ - Local variables:
+ - mode: sgml
+ - End:
+ -->
diff --git a/doc/xsl/pre-latex.xsl b/doc/xsl/pre-latex.xsl
new file mode 100644
index 0000000..9473556
--- /dev/null
+++ b/doc/xsl/pre-latex.xsl
@@ -0,0 +1,55 @@
+<!--
+ - Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ -
+ - Permission to use, copy, modify, and/or distribute this software for any
+ - purpose with or without fee is hereby granted, provided that the above
+ - copyright notice and this permission notice appear in all copies.
+ -
+ - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id: pre-latex.xsl,v 1.6 2007/06/19 23:47:13 tbox Exp $ -->
+
+<!--
+ - Whack &mdash; into something that won't choke LaTeX.
+ - There's probably a better way to do this, but this will work for now.
+ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:variable name="mdash" select="'&#8212;'"/>
+
+ <xsl:template name="fix-mdash" match="text()[contains(., '&#8212;')]">
+ <xsl:param name="s" select="."/>
+ <xsl:choose>
+ <xsl:when test="contains($s, $mdash)">
+ <xsl:value-of select="substring-before($s, $mdash)"/>
+ <xsl:text>---</xsl:text>
+ <xsl:call-template name="fix-mdash">
+ <xsl:with-param name="s" select="substring-after($s, $mdash)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$s"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+</xsl:stylesheet>