Browse code

New Docbook processing system.

This is the new and improved version of the docbook build system that
was present in ser and kamailio. It consists of Makefiles, xslt
stylesheets, css stylesheets, and other auxiliary files that are needed
to convert documentation stored in docbook xml format to various output
formats. We currently support the following outputs: HTML, plain-text,
and module README. Other formats (man pages, chunked HTML and possibly
PDF) will be added later.

First of all, we are moving all files that are part of the docbook
processing system into one directory "docbook". Those files were
previously scaterred across multiple directories in the repository and
having them all at one place make the system less error-prone.

We have merged files containing SGML entity definitions from both
projects into a single file. The file is stored in docbook/entities.xml
and this is the file that should be included by all docbook documents
(we will need to update all such files in all modules).

The Kamailio CSS style sheet for module documentation is now becoming
the main CSS stylesheet for HTML documentation generated from docbook
sources. The new stylesheet is stored in docbook/sr-doc.css. The
contents of the file was slighlty updated to make sure that the styles
in the file match HTML elements in XHTML output. With the new system
the default output HTML flavor is XHTML.

The toplevel Makefile.doc is gone. It is being replaced by file
docbook/Makefile. The new makefile has been extensively polished and
improved. This also requires new Makefiles in modules. All the targets
and references that were used to generate the PDF output in SER are
gone, we were using proprietary FOP processor which is not generally
available. All configuration options that can be overriden from
module/doc Makefiles are extensively commented. The new Makefile can
save the output being generated into a directory specified on the
command line:
$ output_dir=/html make html
The default target of the Makefile is HTML. There is a new target that
can be used generate module README:
$ make readme

The file that should be included from module Makefiles is
docbook/Makefile.modules. At present the file only includes the main
Makefile, but in the future some of the targets that are particular
to module documentation will be moved to this file.

The XML catalog received a small facelift, too. By default the catalog
references /etc/xml/catalog. References to dbschema DTD and XSL files
(dbschema is the scripting system used to generate SQL files in SER)
are gone. They do not belong into this file.

All references to Drupal and drupal related xsl stylesheets are gone.
Those files were used to generate HTML files suitable for inclusion
into Drupal pages at iptel.org.

File doc/kam_module_faq.xml has also been removed, this file was empty,
it was probably added because it was included by far too many docbook
documents in modules. Since I wrote a script to do some compatibility
changes in module docbook files, I taught it to remove the reference
to the file from all docbook files and then deleted the file.

All files in directory "docbook" are briefly described in
docbook/README.

The new system adopted Kamailio costumizations of the docbook stylesheet
that is used to generate READMEs. There is a new stylesheet called
readme.xsl that contains all options that should only be applied when
READMEs are being generated.

The stylesheet that generates man pages from docbook has been moved
from doc/stylesheets to docbook/man.xsl. We do not have yet support for
man pages in the docbook Makefile, this feature will be added later.

New features:
* Automatic dependency calculation. We have a XSL stylesheet which
traverses the source docbook document and produces a list of files
included in the document. This list is then included in the main
Makefile to calculate dependencies. That means you can split your
document into multiple files and the system will always correctly
rebuild the file.

* Support for document inclusion with xi:include. All source docbook
files are processed with the support for xi:include enabled which
makes it possible to include other documents without the need to
use SGML entities to include external files.

* Improved top level make file, among other things the makefile is now
much more flexible, the module can specify different source document
for each type of produced output. The makefile can generate module
READMEs. The output directory is configurable, which is useful if you
need to build a collection of html pages to be uploaded to a server.

* Separate stylesheet to customize the format of module README files.

* Supported output formats:
README
XHTML (single file)
XHTML (multiple files)
Plain-text

* Normalized screens: There is no longer the need to pay attention to
the leading and trailing white space in data of <screen> (and similar)
elements. Stylesheet common.xsl contains a template that does that
automatically (this isn't really a new feature, is was present in
the original ser docbook processing system).

Jan Janak authored on 24/04/2009 00:13:45
Showing 25 changed files
1 1
deleted file mode 100644
... ...
@@ -1,188 +0,0 @@
1
-#
2
-# $Id$
3
-#
4
-
5
-#
6
-# The name of the index file (the one which will be built by default
7
-# without specifying a target
8
-#
9
-DOCUMENTS ?= index
10
-
11
-#
12
-# The root of the document tree, this is used to determine the directory
13
-# of auxiliary files. The variable should be overwritten by per-directory
14
-# Makefiles
15
-#
16
-ROOT_DIR ?= ../../..
17
-COREPATH  ?=$(ROOT_DIR)
18
-
19
-#
20
-# Output directory where files produced by XSL stylesheets should be stored,
21
-# by default we output to the same directory, documents that are chunked may
22
-# choose to override this to write all chunks in a subdirectory instead
23
-#
24
-OUTPUT_DIR ?= .
25
-
26
-#
27
-# Stylesheet used to generate dependencies from XML files
28
-#
29
-DEP_XSL ?= $(ROOT_DIR)/doc/stylesheets/dep.xsl
30
-
31
-#
32
-# Default stylesheet used to generate XHTML
33
-#
34
-XHTML_XSL ?= $(ROOT_DIR)/doc/stylesheets/xhtml.xsl
35
-
36
-#
37
-# Default stylesheet used to generate Drupal HTML without html headers
38
-#
39
-DRUPAL_XSL ?= $(ROOT_DIR)/doc/stylesheets/drupal.xsl
40
-
41
-#
42
-# Default stylesheet used to generate HTML
43
-#
44
-HTML_XSL ?= $(ROOT_DIR)/doc/stylesheets/html.chunked.xsl
45
-
46
-#
47
-# Stylesheet used to generate plain text documents,
48
-# this is usually the one used for xhtml
49
-#
50
-TXT_XSL ?= $(ROOT_DIR)/doc/stylesheets/txt.xsl
51
-
52
-#
53
-# Stylesheet used to generate FO (Formatted Objects)
54
-# This is used by PDF generators
55
-#
56
-FO_XSL ?= $(ROOT_DIR)/doc/stylesheets/fo.xsl
57
-
58
-#
59
-# Disable document validation by default
60
-# 
61
-VALIDATE ?= 0
62
-
63
-#
64
-# K docbook style
65
-#
66
-ifeq ($(DOCBOOK_MODE), k)
67
-	HTML_CSS=/css/kam-module-docbook.css
68
-	XSLTPROC_FLAGS+= --stringparam section.autolabel 1 \
69
-				--stringparam section.label.includes.component.label 1 \
70
-				--stringparam generate.toc "book toc,title,figure,table,example"
71
-endif
72
-
73
-#
74
-# Default CSS used in generated HTMLs
75
-#
76
-HTML_CSS ?= ser.css
77
-
78
-CATALOG=$(ROOT_DIR)/doc/catalog.xml
79
-
80
-LYNX     ?= lynx
81
-DIA      ?= dia
82
-XSLTPROC ?= xsltproc
83
-XMLLINT ?= /usr/bin/xmllint
84
-XEP     ?= /usr/bin/xep
85
-
86
-LYNX_FLAGS     ?= -nolist
87
-DIA_ARGS       ?=
88
-XSLTPROC_FLAGS ?=
89
-XMLLINT_FLAGS ?= --xinclude --postvalid --noout
90
-XEP_FLAGS ?= 
91
-
92
-ifeq ($(VALIDATE), 0)
93
-	override XSLTPROC_FLAGS := $(XSLTPROC_FLAGS) --novalid
94
-endif
95
-
96
-alldep = Makefile $(ROOT_DIR)/Makefile.doc $(DEP_XSL) $(EXTRA_DEPS)
97
-
98
-all: xhtml
99
-
100
-xml_files = $(addsuffix .xml, $(DOCUMENTS))
101
-dep_files = $(addsuffix .d, $(DOCUMENTS))
102
-xhtml_files = $(addsuffix .xhtml, $(DOCUMENTS))
103
-html_files = $(addsuffix .html, $(DOCUMENTS))
104
-txt_files = $(addsuffix .txt, $(DOCUMENTS))
105
-pdf_files = $(addsuffix .pdf, $(DOCUMENTS))
106
-
107
-xhtml: $(xhtml_files)
108
-html: $(html_files)
109
-txt: $(txt_files)
110
-pdf: $(pdf_files)
111
-drupal: override HTML_XSL := $(DRUPAL_XSL)
112
-drupal: $(html_files)
113
-
114
-
115
-%.xhtml: %.xml %.d $(alldep) $(XHTML_XSL)
116
-	XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \
117
-        --xinclude \
118
-        --stringparam base.dir "$(OUTPUT_DIR)/" \
119
-        --stringparam root.filename "$(basename $<)" \
120
-        --stringparam html.ext ".xhtml" \
121
-        --stringparam html.stylesheet $(HTML_CSS) \
122
-        $(XHTML_XSL) $<
123
-
124
-%.html: %.xml %.d $(alldep) $(HTML_XSL)
125
-	XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \
126
-        --xinclude \
127
-        --stringparam base.dir "$(OUTPUT_DIR)/" \
128
-        --stringparam root.filename "$(basename $<)" \
129
-        --stringparam html.ext ".html" \
130
-        --stringparam html.stylesheet $(HTML_CSS) \
131
-        $(HTML_XSL) $<
132
-
133
-%.fo: %.xml $(alldep) $(FO_XSL)
134
-	XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \
135
-        --xinclude \
136
-        -o $@ $(FO_XSL) $<
137
-
138
-%.pdf: %.fo %.d $(alldep)
139
-	$(XEP) $(XEP_FLAGS) -fo $< -pdf $@
140
-
141
-%.txt: %.xml %.d $(alldep)
142
-	XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \
143
-        --xinclude \
144
-        $(TXT_XSL) $< | $(LYNX) $(LYNX_FLAGS) -stdin -dump > $@
145
-
146
-%.png: %.dia $(alldep)
147
-	$(DIA) $(DIA_ARGS) -t png -e $@ $<
148
-
149
-%.d: %.xml $(alldep) 
150
-	$(XSLTPROC) $(XSLTPROC_FLAGS) \
151
-        --nonet \
152
-        --novalid \
153
-        --stringparam output "$@" \
154
-        $(DEP_XSL) $< 
155
-
156
-.PHONY: check
157
-check: $(xml_files)
158
-	XML_CATALOG_FILES=$(CATALOG) $(XMLLINT) $(XMLLINT_FLAGS) $<
159
-
160
-.PHONY: clean
161
-clean:
162
-	@rm -f $(txt_files)
163
-	@rm -f $(xhtml_files)
164
-	@rm -f $(pdf_files)
165
-	@rm -f $(html_files)
166
-
167
-.PHONY: proper distclean realclean maintainer-clean
168
-proper realclean distclean maintainer-clean: clean
169
-	@rm -f $(dep_files) *~
170
-
171
-maintainer-clean: clean-tmp
172
-
173
-.PHONY: clean-tmp
174
-clean-tmp:
175
-	-rm -f TAGS tags *.dbg .*.swp
176
-
177
-
178
-
179
-ifeq (,$(MAKECMDGOALS))
180
-include $(dep_files) 
181
-else
182
-ifeq (,$(strip $(nodep_targets)))
183
-include $(COREPATH)/Makefile.targets
184
-endif
185
-ifneq (,$(filter-out $(nodep_targets) check, $(MAKECMDGOALS)))
186
-include $(dep_files)
187
-endif
188
-endif
189 1
deleted file mode 100644
... ...
@@ -1,53 +0,0 @@
1
-<?xml version="1.0"?>
2
-<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
3
-         "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
4
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
5
-
6
-    <!-- DTDs and XSL stylesheets for DBSchema are bundled with SER
7
-         so we will just redirect xsltproc to their location in the
8
-	 source tree
9
-      -->
10
-    <public publicId="-//iptel.org//DTD DBSchema V1.0//EN"
11
-            uri="stylesheets/dbschema/dtd/dbschema.dtd"/>
12
-
13
-    <rewriteURI uriStartString="http://iptel.org/dbschema/xsl/current/"
14
-                rewritePrefix="stylesheets/dbschema/xsl/"/> 
15
-
16
-    <!-- Uncomment the following entry if you have docbook DTDs in unusual
17
-         location or if you would like to validate the documentation against
18
-	 newer docbook version
19
-      -->
20
-    <!--
21
-    <public publicId="-//OASIS//DTD DocBook XML V4.3//EN"
22
-            uri="file:///home/janakj/docbook/dtd/docbookx.dtd"/>
23
-      -->
24
-
25
-    <!-- Uncomment the following entry if you have docbook XSL stylesheets
26
-         in unusual location, the value of rewritePrefix parameter should
27
-	 point to the top level directory of your XSL stylesheets
28
-      -->
29
-    <!--
30
-    <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/"
31
-                rewritePrefix="file:///home/janakj/docbook/xsl/"/>
32
-      -->
33
-
34
-    <!-- Try the system wide catalogs as the last step before reverting
35
-         to using the value of system identifiers and URI references
36
-	 from the documents being processed (they usualy contain HTTP
37
-	 URIs).
38
-      -->
39
-    <delegatePublic publicIdStartString="" catalog="file:///etc/xml/catalog"/>
40
-    <delegateURI    uriStartString=""      catalog="file:///etc/xml/catalog"/>
41
-
42
-    <!-- If xsltproc gets here while searching the catalog then no entry was
43
-         found in the catalog files for the requested resource and in this case
44
-	 xsltproc will attempt to download the resource from the internet using
45
-	 the HTTP protocol. It will use the HTTP URIs from system identifiers
46
-	 and URI references (therefore the XSL customization stylesheets in SER
47
-	 refer to the original XSL stylesheets using HTTP URIs).
48
-
49
-	 Note: Downloading DTDs and XSL stylesheets can be very slow, because
50
-	       each file will be downloaded several times, because xsltproc
51
-	       does not cache downloaded files.
52
-      -->
53
-</catalog>
54 1
deleted file mode 100644
55 2
deleted file mode 100644
... ...
@@ -1,48 +0,0 @@
1
-<!-- $Id$ -->
2
-
3
-<!-- Entities often used in the documentation -->
4
-
5
-<!ENTITY fhg "FhG FOKUS">
6
-<!ENTITY iptel "<ulink url='http://iptel.org'>iptel.org</ulink>">
7
-<!ENTITY ser "SER">
8
-<!ENTITY sername "SIP Express Router">
9
-
10
-<!ENTITY serhome "http://iptel.org/ser">
11
-<!ENTITY serbugs "http://iptel.org/ser/bugs">
12
-<!ENTITY serusers "http://mail.iptel.org/mailman/listinfo/serusers">
13
-<!ENTITY serdev "http://mail.iptel.org/mailman/listinfo/serdev">
14
-
15
-<!ENTITY serhomelink "<ulink url='&serhome;'>&serhome</ulink>">
16
-<!ENTITY serbugslink "<ulink url='&serbugs;'>&serbugs</ulink>">
17
-<!ENTITY seruserslink "<ulink url='&serusers;'>&serusers</ulink>">
18
-<!ENTITY serdevlink "<ulink url='&serdev;'>&serdev</ulink>">
19
-
20
-<!ENTITY serusersmail "<email>serusers@iptel.org</email>">
21
-<!ENTITY serdevmail "<email>serdev@iptel.org</email>">
22
-
23
-<!-- Often used acronyms -->
24
-
25
-<!ENTITY sip "<acronym>SIP</acronym>">
26
-<!ENTITY sdp "<acronym>SDP</acronym>">
27
-<!ENTITY rtp "<acronym>RTP</acronym>">
28
-<!ENTITY pstn "<acronym>PSTN</acronym>">
29
-<!ENTITY http "<acronym>HTTP</acronym>">
30
-<!ENTITY uri "<acronym>URI</acronym>">
31
-<!ENTITY url "<acronym>URL</acronym>">
32
-<!ENTITY uac "<acronym>UAC</acronym>">
33
-<!ENTITY uas "<acronym>UAS</acronym>">
34
-<!ENTITY ua "<acronym>UA</acronym>">
35
-<!ENTITY nat "<acronym>NAT</acronym>">
36
-<!ENTITY ip "<acronym>IP</acronym>">
37
-<!ENTITY udp "<acronym>UDP</acronym>">
38
-<!ENTITY ietf "<ulink url='http://www.ietf.org'>IETF</ulink>">
39
-<!ENTITY im "<acronym>IM</acronym>">
40
-<!ENTITY smtp "<acronym>SMTP</acronym>">
41
-<!ENTITY gnu "<ulink url='http://www.gnu.org'>GNU</ulink>">
42
-<!ENTITY gpl "<ulink url='http://www.gnu.org/licenses/licenses.html#GPL'>GPL</ulink>">
43
-
44
-<!-- Often used RFCs -->
45
-
46
-<!ENTITY rfc3261 "<ulink url='http://www.ietf.org/rfc/rfc3261.txt'>RFC3261</ulink>">
47
-<!ENTITY rfc822 "<ulink url='http://www.ietf.org/rfc/rfc822.txt'>RFC822</ulink>">
48
-<!ENTITY rfc2543 "<ulink url='http://www.ietf.org/rfc/rfc2543.txt'>RFC2543</ulink>">
49 1
deleted file mode 100644
... ...
@@ -1,53 +0,0 @@
1
-Description of files in this directory:
2
-
3
-* common.xsl:
4
-     Customization regardless of output format. This file contains,
5
-     for example, XSL code that strips leading and trailing
6
-     whitespace from screen sections
7
-
8
-* xhtml.common.xsl:
9
-     Common customization for XHTML output. Some parts of the
10
-     documentation tree may use a bit different customized stylesheets
11
-     to generate the output. This file contains sections that are
12
-     common for all of them, such as options needed to generate strict
13
-     nicely formatted XHTML output.
14
-
15
-* xhtml.root.xsl:
16
-     Stylesheet used to build all the documentation. This stylesheet
17
-     is used for the documentation root in sip_router/doc/doc_root.xml.
18
-     This stylesheet generates chunked XHTML output in xhtml subdirectory.
19
-
20
-* xhtml.xsl:
21
-     Stylesheet used to build parts of the documentation tree. This would
22
-     generate single large xhtml file in the same directory.
23
-
24
-* xhtml.chunked.xsl:
25
-     Stylesheet used to generate chunked xhtml version, i.e. multiple 
26
-     files. Normally used with a Makefile setting output_dir=some_sub_dir
27
-     to generate all output files in one directory.
28
-
29
-* html.chunked.xsl:
30
-     Stylesheet used to generate chunked html version, i.e. multiple
31
-     files. Used to generate html that browsers without xhtml support
32
-     can view.  Normally used with a Makefile setting 
33
-     output_dir=some_sub_dir to generate all output files in one directory.
34
-
35
-* dep.xsl:
36
-     XSL stylesheet that traverses XML documents and generates list of
37
-     dependencies that will be included by makefiles.
38
-
39
-* txt.xsl:
40
-     XSL stylesheet used to generate plain text version of documentation.
41
-     XHTML stylesheets are used to generate XHTML code that is then fed
42
-     to lynx to produce plain text version. This stylesheet contains XHTML
43
-     customization that are applied only when TXT is generated.
44
-
45
-* ser.css:
46
-     Cascade stylesheets for XHTML outpout. Presentation related settings
47
-     go here.
48
-
49
-* dbschema/:
50
-     Stylesheets that generate SQL statements for various database systems
51
-     from the XML description in sip_router/db/schema.
52
-
53
-  -- Jan Janak <jan@iptel.org>, $Id$
54 1
deleted file mode 100644
... ...
@@ -1,44 +0,0 @@
1
-<?xml version='1.0'?>
2
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
-     version='1.0' xmlns:xi="http://www.w3.org/2001/XInclude">
4
-
5
-    <xsl:param name="prefix"/>
6
-    <xsl:param name="output"/>
7
-
8
-    <xsl:template match="/">
9
-	<xsl:document href="{$output}" method="text" indent="no" omit-xml-declaration="yes">
10
-            <xsl:value-of select="concat($output, ': ')"/>
11
-	    <xsl:apply-templates mode="subroot"/>
12
-	</xsl:document>
13
-    </xsl:template>
14
-
15
-    <xsl:template name="get-prefix">
16
-	<xsl:if test="contains($prefix, '/')">
17
-	    <xsl:value-of select="concat(substring-before($prefix, '/'), '/')"/>
18
-	    <xsl:call-template name="get-prefix">
19
-		<xsl:with-param name="prefix" select="substring-after($prefix, '/')"/>
20
-	    </xsl:call-template>
21
-	</xsl:if>
22
-    </xsl:template>
23
-    
24
-    <xsl:template match='xi:include' mode="subroot">
25
-	<xsl:value-of select="concat($prefix, concat(@href, ' '))"/>
26
-	<xsl:apply-templates select="document(@href)" mode="subroot">
27
-	    <xsl:with-param name="prefix">
28
-		<xsl:call-template name="get-prefix">
29
-		    <xsl:with-param name="prefix" select="concat($prefix, @href)"/>
30
-		</xsl:call-template>
31
-	    </xsl:with-param>
32
-	</xsl:apply-templates>
33
-    </xsl:template>
34
-    
35
-    <xsl:template match='xi:include[@parse="text"]' mode="subroot">
36
-	<xsl:value-of select="concat($prefix, concat(@href, ' '))"/>
37
-    </xsl:template>
38
-    
39
-    <xsl:template match="graphic|imagedata|inlinemediaobject|textdata" mode="subroot">
40
-	<xsl:value-of select="concat($prefix, concat(@fileref, ' '))"/>
41
-    </xsl:template>
42
-    
43
-    <xsl:template match="text()|@*" mode="subroot"/>
44
-</xsl:stylesheet>
45 1
deleted file mode 100644
... ...
@@ -1,163 +0,0 @@
1
-<?xml version="1.0" encoding="US-ASCII"?>
2
-
3
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl">
4
-
5
-    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
6
-    <xsl:import href="xhtml.common.xsl"/>
7
-
8
-    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk-common.xsl"/>
9
-
10
-    <xsl:include href="http://docbook.sourceforge.net/release/xsl/current/xhtml/manifest.xsl"/>
11
-    <xsl:include href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk-code.xsl"/>
12
-    
13
-    <xsl:param name="use.id.as.filename">yes</xsl:param>
14
-    <xsl:param name="chunk.quietly">1</xsl:param>
15
-    <xsl:param name="suppress.header.navigation">1</xsl:param>
16
-
17
-
18
-<xsl:template name="chunk-element-content">
19
-  <xsl:param name="prev"/>
20
-  <xsl:param name="next"/>
21
-  <xsl:param name="nav.context"/>
22
-  <xsl:param name="content">
23
-    <xsl:apply-imports/>
24
-  </xsl:param>
25
-
26
-<!--
27
- <xsl:call-template name="user.preroot"/>
28
-      <xsl:call-template name="user.header.navigation"/>
29
-
30
-      <xsl:call-template name="header.navigation">
31
-        <xsl:with-param name="prev" select="$prev"/>
32
-        <xsl:with-param name="next" select="$next"/>
33
-        <xsl:with-param name="nav.context" select="$nav.context"/>
34
-      </xsl:call-template>
35
-
36
-      <xsl:call-template name="user.header.content"/>
37
-
38
-      <xsl:copy-of select="$content"/>
39
-
40
-      <xsl:call-template name="user.footer.content"/>
41
-
42
-      <xsl:call-template name="footer.navigation">
43
-        <xsl:with-param name="prev" select="$prev"/>
44
-        <xsl:with-param name="next" select="$next"/>
45
-        <xsl:with-param name="nav.context" select="$nav.context"/>
46
-      </xsl:call-template>
47
-
48
-      <xsl:call-template name="user.footer.navigation"/>
49
-</xsl:template>
50
-
51
-<!---    
52
-    <xsl:template name="dbhtml-chunk">
53
-	<xsl:param name="pis" select="./processing-instruction('dbhtml')"/>
54
-	<xsl:call-template name="dbhtml-attribute">
55
-	    <xsl:with-param name="pis" select="$pis"/>
56
-	    <xsl:with-param name="attribute">chunk</xsl:with-param>
57
-	</xsl:call-template>
58
-    </xsl:template>
59
-    <!-- Override chunk template, it will also check if the dbhtml PI contains
60
-         chunk="yes" attribute and if so then it will start a new chunk. This
61
-         allows for fine-grained manual chunking
62
-    -->
63
-<!--
64
-    <xsl:template name="chunk">
65
-	<xsl:param name="node" select="."/>
66
-
67
-	<xsl:variable name="make_chunk">
68
-	    <xsl:call-template name="dbhtml-chunk">
69
-		<xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
70
-	    </xsl:call-template>
71
-	</xsl:variable>
72
-
73
-	<xsl:choose>
74
-	    <xsl:when test="$make_chunk='yes'">1</xsl:when>
75
-	    <xsl:when test="not($node/parent::*)">1</xsl:when>
76
-	    <xsl:when test="local-name($node)='sect1' and 
77
-		            $chunk.section.depth &gt;= 1 and 
78
-		            ($chunk.first.sections != 0 or
79
-		            count($node/preceding-sibling::sect1) &gt; 0)
80
-		           ">
81
-		<xsl:text>1</xsl:text>
82
-	    </xsl:when>
83
-	    <xsl:when test="local-name($node)='sect2' and 
84
-		            $chunk.section.depth &gt;= 2 and 
85
-		            ($chunk.first.sections != 0 or 
86
-		            count($node/preceding-sibling::sect2) &gt; 0)
87
-		           ">
88
-		<xsl:call-template name="chunk">
89
-		    <xsl:with-param name="node" select="$node/parent::*"/>
90
-		</xsl:call-template>
91
-	    </xsl:when>
92
-	    <xsl:when test="local-name($node)='sect3' and 
93
-		            $chunk.section.depth &gt;= 3 and 
94
-		            ($chunk.first.sections != 0 or
95
-		            count($node/preceding-sibling::sect3) &gt; 0)
96
-		           ">
97
-		<xsl:call-template name="chunk">
98
-		    <xsl:with-param name="node" select="$node/parent::*"/>
99
-		</xsl:call-template>
100
-	    </xsl:when>
101
-	    <xsl:when test="local-name($node)='sect4' and 
102
-		            $chunk.section.depth &gt;= 4 and 
103
-		            ($chunk.first.sections != 0 or 
104
-		            count($node/preceding-sibling::sect4) &gt; 0)
105
-		           ">
106
-		<xsl:call-template name="chunk">
107
-		    <xsl:with-param name="node" select="$node/parent::*"/>
108
-		</xsl:call-template>
109
-	    </xsl:when>
110
-	    <xsl:when test="local-name($node)='sect5' and 
111
-		            $chunk.section.depth &gt;= 5 and 
112
-		            ($chunk.first.sections != 0 or 
113
-		            count($node/preceding-sibling::sect5) &gt; 0)
114
-		           ">
115
-		<xsl:call-template name="chunk">
116
-		    <xsl:with-param name="node" select="$node/parent::*"/>
117
-		</xsl:call-template>
118
-	    </xsl:when>
119
-	    <xsl:when test="local-name($node)='section' and 
120
-		            $chunk.section.depth&gt;=count($node/ancestor::section)+1
121
-		            and  ($chunk.first.sections != 0 or 
122
-		            count($node/preceding-sibling::section) &gt; 0)
123
-		           ">
124
-		<xsl:call-template name="chunk">
125
-		    <xsl:with-param name="node" select="$node/parent::*"/>
126
-		</xsl:call-template>
127
-	    </xsl:when>
128
-	    
129
-	    <xsl:when test="local-name($node)='preface'">1</xsl:when>
130
-	    <xsl:when test="local-name($node)='chapter'">1</xsl:when>
131
-	    <xsl:when test="local-name($node)='appendix'">1</xsl:when>
132
-	    <xsl:when test="local-name($node)='article'">1</xsl:when>
133
-	    <xsl:when test="local-name($node)='part'">1</xsl:when>
134
-	    <xsl:when test="local-name($node)='reference'">1</xsl:when>
135
-	    <xsl:when test="local-name($node)='refentry'">1</xsl:when>
136
-
137
-	    <xsl:when test="local-name($node)='index' and 
138
-		            ($generate.index != 0 or count($node/*) &gt; 0) 
139
-		            and (local-name($node/parent::*) = 'article' or 
140
-		            local-name($node/parent::*) = 'book' or 
141
-		            local-name($node/parent::*) = 'part')">1
142
-	    </xsl:when>
143
-	    <xsl:when test="local-name($node)='bibliography' and 
144
-		            (local-name($node/parent::*) = 'article' or 
145
-		            local-name($node/parent::*) = 'book' or 
146
-		            local-name($node/parent::*) = 'part')">1</xsl:when>
147
-	    <xsl:when test="local-name($node)='glossary' and 
148
-		            (local-name($node/parent::*) = 'article' or 
149
-		            local-name($node/parent::*) = 'book' or 
150
-		            local-name($node/parent::*) = 'part')">1</xsl:when>
151
-	    <xsl:when test="local-name($node)='colophon'">1</xsl:when>
152
-	    <xsl:when test="local-name($node)='book'">1</xsl:when>
153
-	    <xsl:when test="local-name($node)='set'">1</xsl:when>
154
-	    <xsl:when test="local-name($node)='setindex'">1</xsl:when>
155
-	    <xsl:when test="local-name($node)='legalnotice' and $generate.legalnotice.link != 0">1</xsl:when>
156
-	    <xsl:otherwise>0</xsl:otherwise>
157
-	</xsl:choose>
158
-    </xsl:template>
159
-
160
-</xsl:stylesheet>
161 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-<?xml version='1.0'?>
2
-
3
-<!-- Common settings for generating FO output -->
4
-<xsl:stylesheet  
5
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
6
-
7
-    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
8
-    <xsl:import href="common.xsl"/>
9
-
10
-    <xsl:param name="paper.type">A4</xsl:param>
11
-    <xsl:param name="double.sided">1</xsl:param>
12
-    <xsl:param name="xep.extensions">1</xsl:param>
13
-    <xsl:param name="insert.xref.page.number">yes</xsl:param>
14
-    <xsl:param name="admon.graphics">1</xsl:param>
15
-    <xsl:param name="ulink.footnotes">0</xsl:param>
16
-</xsl:stylesheet>
17 1
deleted file mode 100644
... ...
@@ -1,40 +0,0 @@
1
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2
-                xmlns:exsl="http://exslt.org/common"
3
-		version="1.0"
4
-                exclude-result-prefixes="exsl">
5
-
6
-<!-- ********************************************************************
7
-     $Id$
8
-     ********************************************************************
9
-
10
-     This file is part of the XSL DocBook Stylesheet distribution.
11
-     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
12
-     and other information.
13
-
14
-     ******************************************************************** -->
15
-
16
-<!-- ==================================================================== -->
17
-
18
-<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
19
-<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk-common.xsl"/>
20
-<xsl:include href="http://docbook.sourceforge.net/release/xsl/current/html/manifest.xsl"/>
21
-
22
-<!-- Why is chunk-code now xsl:included?
23
-
24
-Suppose you want to customize *both* the chunking algorithm used *and* the
25
-presentation of some elements that may be chunks. In order to do that, you
26
-must get the order of imports "just right". The answer is to make your own
27
-copy of this file, where you replace the initial import of "docbook.xsl"
28
-with an import of your own base.xsl (that does its own import of docbook.xsl).
29
-
30
-Put the templates for changing the presentation of elements in your base.xsl.
31
-
32
-Put the templates that control chunking after the include of chunk-code.xsl.
33
-
34
-Voila! (Man I hope we can do this better in XSLT 2.0)
35
-
36
-
37
-<xsl:include href="http://docbook.sourceforge.net/release/xsl/current/html/chunk-code.xsl"/>
38
-
39
-</xsl:stylesheet>
40 1
deleted file mode 100644
... ...
@@ -1,192 +0,0 @@
1
-/* Inspired by docbook.css from Phorum.org */
2
-body {
3
-    font-family: arial,helvetica,sans-serif;
4
-    color: #345;
5
-    line-height: 1.3em;
6
-    padding: 20px;
7
-    margin: 10px 50px 10px 50px;
8
-}
9
-
10
-a:link,a:visited,a:active {
11
-    color: #3D6F3D;
12
-}
13
-a:hover {
14
-    color: #5C5CA6;
15
-}
16
-h1,h2,h3,h4 {
17
-    color: black;
18
-    padding-top: 20px;
19
-}
20
-h1 {
21
-    border: 3px solid black;
22
-    padding: 5px;
23
-    background-color: #ccf;
24
-    color: black;
25
-}
26
-
27
-h2.title {
28
-	border: 3px solid black;
29
-	padding: 8px;
30
-	background-color: #ccf;
31
-	color: black;
32
-}
33
-
34
-h3.title {
35
-    border: 2px solid black;
36
-    padding: 5px;
37
-    background-color: #ccf;
38
-    color: black;
39
-}
40
-
41
-h3.author {
42
-    font-size: 20px;
43
-    padding-top: 0px;
44
-}
45
-
46
-h4.title {
47
-	margin: 15px;
48
-	padding: 2px;
49
-	background-color: #ddd;
50
-	color: black;
51
-	font-size: 20px;
52
-}
53
-
54
-.programlisting {
55
-    background-color: #f5f5f5;
56
-    border: 1px solid black;
57
-    padding: 10px;
58
-    margin: 5px 40px;
59
-}
60
-
61
-.screen {
62
-    background-color: #f5f5f5;
63
-    color: black;
64
-    border: 1px solid black;
65
-    padding: 10px;
66
-    margin: 5px 40px;
67
-}
68
-.screen .literal {
69
-    font-size: inherit;
70
-    color: darkgreen;
71
-}
72
-
73
-p {
74
-    padding-left: 30px;
75
-}
76
-
77
-.itemizedlist {
78
-    margin-left: 30px;
79
-}
80
-
81
-li p {
82
-    padding: 0px;
83
-}
84
-
85
-.copyright,.toc {
86
-    padding-left: 0px;
87
-}
88
-
89
-.toc {
90
-    color: black;
91
-}
92
-.toc p,
93
-.list-of-examples p {
94
-    padding-left: 0px;
95
-}
96
-
97
-.example .title {
98
-    font-size: 14px;
99
-    margin: 0px;
100
-}
101
-
102
-.variablelist .term {
103
-    font-weight: bold;
104
-    padding-left: 40px;
105
-}
106
-
107
-
108
-.filename {
109
-    white-space: nowrap;
110
-    font-size: 16px;
111
-    color: darkred;
112
-}
113
-
114
-.literal {
115
-    white-space: nowrap;
116
-    font-size: 16px;
117
-    color: darkblue;
118
-}
119
-
120
-.note {
121
-    border: 1px solid #ccc;
122
-    padding: 10px;
123
-    padding-left: 20px;
124
-/*
125
-    background-image: url(&quot;images/note.png&quot;);
126
-    background-position: 10px 15px;
127
-    background-repeat: no-repeat;
128
-*/
129
-}
130
-.note h3.title {
131
-    border: 1px solid #ccc;
132
-    background-color: #ddd;
133
-    padding: 3px;
134
-    padding-left: 10px;
135
-    margin: 5px;
136
-    font-size: 14px;
137
-}
138
-
139
-.important {
140
-    border: 1px solid #ddd;
141
-    padding: 15px;
142
-    padding-left: 70px;
143
-	/*
144
-    background-image: url(&quot;images/important.gif&quot;);
145
-    background-position: 10px 15px;
146
-    background-repeat: no-repeat;
147
-	*/
148
-}
149
-.important h3 {
150
-    padding: 0px 0px 10px 0px;
151
-    margin: 0px;
152
-    color: black;
153
-}
154
-.important p {
155
-    padding: 0px;
156
-    margin: 0px;
157
-}
158
-.important .programlisting {
159
-    margin: 10px 0px 10px 0px;
160
-}
161
-
162
-.remark {
163
-    background-color: darkred;
164
-    color: white;
165
-    border: 1px solid black;
166
-    padding: 5px;
167
-    margin: 10px 10px 10px 0px;
168
-    display: block; /* Change to &quot;none&quot; in production */
169
-}
170
-
171
-.navheader th,td,tr {
172
-	background-color: #D5D0D2;
173
-	font-size: 18px;
174
-	padding: 5px;
175
-	display: block;
176
-	border: 1px solid black;
177
-}
178
-
179
-.revhistory th,td,tr {
180
-    background-color: #f5f5f5;
181
-    font-size: 10px;    
182
-    padding: 5px;
183
-    display: none;
184
-}
185
-
186
-.varname {
187
-	padding: 0px 0px 10px 0px;
188
-	margin: 0px;
189
-	color: black;
190
-	font-style: italic;
191
-	font-size: x-small;
192
-}
193 1
new file mode 100644
... ...
@@ -0,0 +1,193 @@
0
+# This variable contains a list of docbook sources separated by white space to
1
+# be processed by the docbook build system if the user did not specify any
2
+# document on the command line. Documents configure here are processed one
3
+# after another, each of them will be treated as a standalone documentation
4
+# file.
5
+docs ?= index.xml
6
+
7
+# Here you can specify the name of the file that will be used to generate a
8
+# module README file. You can override it in a module Makefile. This is
9
+# useful, for example, if you want to use a different docbook file to generate
10
+# README and a different docbook file to generate documentation in other
11
+# formats (HTML, TXT). If you omit this variable in your Makefile then the
12
+# first document specified in DOCS is used to generate module README file.
13
+readme_docs ?= $(docs)
14
+
15
+# This is the list of docbook files to be used to generate HTML
16
+# documentation. You can use this variable in your Makefile if you have
17
+# docbook documents that should be processed only when HTML documentation is
18
+# being generated (i.e. you want them to be ignored when plain-text
19
+# documentation is being generated). Multiple documents separated by white
20
+# space can be configured here and they will be processed one after
21
+# another. If you omit this variable then the documents specified in DOCS
22
+# variable will be converted to HTML when HTML documentation is being built.
23
+html_docs ?= $(docs)
24
+
25
+# This is the list of docbook files to be used to generate plain-text
26
+# documentation. You can use this variable in your Makefile if you have
27
+# docbook documents that should be processed only when plain-textdocumentation
28
+# is being generated (i.e. you want them to be ignored when HTML documentation
29
+# is being generated). Multiple documents separated by white space can be
30
+# configured here and they will be processed one after another. If you omit
31
+# this variable then the documents specified in DOCS variable will be
32
+# converted to plain-text when plain-text documentation is being built.
33
+txt_docs ?= $(docs)
34
+
35
+# Output directory where files produced by XSL stylesheets should be stored,
36
+# by default we output to the same directory, documents that are chunked may
37
+# choose to override this to write all chunks in a subdirectory instead.
38
+output_dir ?= .
39
+
40
+# Here you can configure the path to the directory which contains all
41
+# auxiliary files that are needed to convert docbook documentation to other
42
+# formats. You should not need to use this variable under normal
43
+# circumstances.
44
+docbook_dir ?= ../../../docbook
45
+COREPATH ?= $(docbook_dir)/..
46
+
47
+# This is the stylesheet used to generate a list of dependencies for a docbook
48
+# source file. The stylesheet walks through the document and prints all files
49
+# that are included in the document. The list of files is then written in a
50
+# standalone file by this Makefile and the file can be included by the
51
+# Makefile.
52
+dep_xsl ?= $(docbook_dir)/dep.xsl
53
+
54
+# This is the stylesheet that is used to produce a single HTML file for every
55
+# docbook document being processed. This stylesheet contains configuration for
56
+# docbook XSL scripts that only applies when the build system generates a
57
+# single HTML file.
58
+single_html_xsl ?= $(docbook_dir)/html.xsl
59
+
60
+# This stylesheet is used to produce chunked HTML documention, the output will
61
+# be a set of HTML files. This stylesheet contains configuration for docbook
62
+# XSL scripts that only applies when multiple-file HTML documentation is being
63
+# generated.
64
+chunked_html_xsl ?= $(chunked_html_xls)/html.chunked.xsl
65
+
66
+# This stylesheet is used to produce plain-text documentation. Internally this
67
+# stylesheet includes the docbook XSL stylesheet used to produce single-file
68
+# HTML documentation and the output is then converted by lynx to a plain-text
69
+# file.
70
+txt_xsl ?= $(docbook_dir)/txt.xsl
71
+
72
+# This stylesheet is used when the docbook build system generates a module
73
+# README. The process is similar to the process of generating plain-text file,
74
+# but we use a separate stylesheet here because the configuration of docbook
75
+# XSL stylesheets can be a bit different for READMEs (i.e. we do not want to
76
+# have list of examples in READMES, etc.)
77
+readme_xsl ?= $(docbook_dir)/readme.xsl
78
+
79
+# Use this configuration variable to enable or disable docbook document
80
+# validation before the build system converts the document into another
81
+# format.
82
+validate ?= 0
83
+
84
+# A list of CSS stylesheets separated by whitespace to be included in HTML
85
+# files.
86
+html_css ?= /css/sr-doc.css
87
+
88
+# This is the catalog file used by xsltproc to locate docbook schema files
89
+# needed to validate docbook documents and docbook XSL stylesheets needed
90
+# convert docbook documents to other formats. All docbook documents in the
91
+# sip-router projects refer to schema files using public
92
+# identifiers. Similarly customization stylesheets refer to docbook XSL
93
+# stylesheets using public URIs. The catalog file is then used to convert
94
+# public identifiers and public URIs to files on local filesystem. The default
95
+# version of the catalog file only refers to file /etc/xml/catalog, this is
96
+# the site-wide catalog file present in Debian and possibly other systems
97
+# too. This file is updated by the package manager whenever docbook schema
98
+# file or docbook xsl stylesheets are being installed.
99
+catalog=$(docbook_dir)/catalog.xml
100
+
101
+lynx     ?= lynx
102
+dia      ?= dia
103
+xsltproc ?= xsltproc
104
+xmllint  ?= xmllint
105
+
106
+lynx_flags     ?= -nolist
107
+dia_args       ?=
108
+xsltproc_flags ?=
109
+xmllint_flags  ?= --xinclude --postvalid --noout
110
+
111
+ifeq ($(validate), 0)
112
+	override xsltproc_flags := $(xsltproc_flags) --novalid
113
+endif
114
+
115
+all_deps = Makefile $(docbook_dir)/Makefile $(dep_xsl) $(catalog) $(extra_deps)
116
+
117
+all: txt
118
+
119
+html_files = $(addprefix $(output_dir)/, $(addsuffix .html,\
120
+			 $(basename $(html_docs))))
121
+html_deps = $(addsuffix .d, $(basename $(html_docs)))
122
+
123
+txt_files = $(addprefix $(output_dir)/, $(addsuffix .txt,\
124
+			$(basename $(txt_docs))))
125
+txt_deps = $(addsuffix .d, $(basename $(txt_docs)))
126
+
127
+readme_deps = $(addsuffix .d, $(basename $(readme_docs)))
128
+
129
+html xhtml single_html single_xhtml: $(html_files)
130
+txt text plaintext: $(txt_files)
131
+readme README: ../README
132
+
133
+../README: $(readme_docs) $(readme_deps) $(readme_xsl) $(all_deps)
134
+	XML_CATALOG_FILES=$(catalog) $(xsltproc) $(xsltproc_flags) \
135
+		--xinclude \
136
+        $(readme_xsl) $< | $(lynx) $(lynx_flags) -stdin -dump > $@
137
+
138
+$(output_dir)/%.html: %.xml %.d $(single_html_xsl) $(all_deps)
139
+	XML_CATALOG_FILES=$(catalog) $(xsltproc) $(xsltproc_flags) \
140
+        --xinclude \
141
+        --stringparam base.dir "$(output_dir)/" \
142
+        --stringparam root.filename "$(basename $<)" \
143
+        --stringparam html.stylesheet "$(html_css)" \
144
+        --stringparam html.ext ".html" \
145
+        $(single_html_xsl) $<
146
+
147
+
148
+$(output_dir)/%.txt: %.xml %.d $(txt_xsl) $(all_dep)
149
+	XML_CATALOG_FILES=$(catalog) $(xsltproc) $(xsltproc_flags) \
150
+		--xinclude \
151
+        $(txt_xsl) $< | $(lynx) $(lynx_flags) -stdin -dump > $@
152
+
153
+%.png: %.dia $(all_dep)
154
+	$(dia) $(dia_flags) -t png -e $@ $<
155
+
156
+%.d: %.xml $(all_dep) 
157
+	$(xsltproc) $(xsltproc_flags) \
158
+        --nonet \
159
+        --novalid \
160
+        --stringparam output "$@" \
161
+        $(dep_xsl) $< 
162
+
163
+.PHONY: check
164
+check: $(docs) $(html_docs) $(txt_docs) $(readme_docs)
165
+	XML_CATALOG_FILES=$(catalog) $(xmllint) $(xmllint_flags) $<
166
+
167
+.PHONY: clean
168
+clean:
169
+	-rm -f $(html_files) $(txt_files)
170
+
171
+
172
+.PHONY: proper realclean distclean maintainer-clean
173
+proper realclean distclean maintainer-clean: clean
174
+	-rm -f $(html_deps) $(txt_deps) $(readme_deps) *~
175
+
176
+maintainer-clean: clean-tmp
177
+
178
+.PHONY: clean-tmp
179
+clean-tmp:
180
+	-rm -f TAGS tags *.dbg .*.swp
181
+
182
+
183
+ifeq (,$(MAKECMDGOALS))
184
+include $(html_deps) $(txt_deps) $(readme_deps)
185
+else
186
+ifeq (,$(strip $(nodep_targets)))
187
+include $(COREPATH)/Makefile.targets
188
+endif
189
+ifneq (,$(filter-out $(nodep_targets) check, $(MAKECMDGOALS)))
190
+include $(html_deps) $(txt_deps) $(readme_deps)
191
+endif
192
+endif
0 193
new file mode 100644
... ...
@@ -0,0 +1,4 @@
0
+# This is the future home for module specific targets,
1
+# nothing here yet
2
+
3
+include $(docbook_dir)/Makefile
0 4
\ No newline at end of file
1 5
new file mode 100644
... ...
@@ -0,0 +1,66 @@
0
+This directory contains a number of auxiliary files that are used by the
1
+docbook build system to convert the documentation in docbook-xml format to
2
+various output formats.
3
+
4
+* catalog.xml:
5
+    This is a XML catalog file. The file is used by the tools that process
6
+    docbook sources to map public identifiers, which are commonly found in
7
+    docbook source files, such as 
8
+      "-//OASIS//DTD DocBook XML V4.3//EN"
9
+    to local files. The default version of the file refers to a generic 
10
+    catalog file that is commonly found in /etc/xml/catalog.
11
+
12
+    You can modify the file if you want to use a particular version of docbook
13
+    schema files or XSL stylesheets to produce the output. This is very useful
14
+    because there is no need to modify source docbook files, the catalog file
15
+    can be used to re-map the public identifier in those files to a local (and
16
+    possibly customized) version of the schema or stylesheets.
17
+
18
+* common.xsl:
19
+    This file contains docbook XSL stylesheet customizations that are shared
20
+    by all output-specific XSL files, for example, the code that strips
21
+    leading and trailing whitespace in <screen> sections is located here.
22
+
23
+* dep.xsl:
24
+    This file contains a special XSL stylesheet which can be used to produce a
25
+    file with dependencies for any given docbook source file. The stylesheet
26
+    traverses docbook documents and looks for files included with the
27
+    xi:include mechanism, or for files included by docbook tags, such as
28
+    images, screen listings, etc. The list of dependencies is then written in
29
+    a separate file and the file can be included in a Makefile that is used to
30
+    build documentation. This is all done by the docbook makefile system.
31
+
32
+* html.chunked.xsl: 
33
+    The stylesheet in this file is used to generate HTML output split in
34
+    multiple files. This is useful if you need to generate HTML files with
35
+    documentation for browsers that do not support XHTML.
36
+
37
+* Makefile:
38
+    This is the main Makefile of the Docbook build system. Rules implemented
39
+    in this Makefile can be used to validate docbook documents, generate lists
40
+    of dependendies, generate HTML, plain-text, READMEs, and other output
41
+    formats out of docbook documents. This file is not meant to be used
42
+    directly. Instead, each directory with docbook source files should have
43
+    its own minimal Makefile which includes this file.
44
+
45
+* man.xsl:
46
+    This stylesheet can be used to convert docbook sources into man pages. The
47
+    docbook build system uses this stylesheet to convert docbook files with
48
+    man pages contents to real man pages, some modules contain such docbook
49
+    files.
50
+
51
+* readme.xsl:
52
+	This stylesheet is used to generate module README files from docbook sources.
53
+
54
+* sr-doc.css:
55
+    The CSS stylesheets that are used for online HTML documentation generated
56
+    from docbook sources.
57
+
58
+* txt.xsl:
59
+    The XSL stylesheet used to generate plain text version of the
60
+    documentation.  XHTML stylesheets are used to generate XHTML code that is
61
+    then fed to lynx to produce plain a text version. This stylesheet contains
62
+    XHTML customization that are applied only when a plain-text output is
63
+    desired.
64
+
65
+  -- Jan Janak <jan@iptel.org>
0 66
new file mode 100644
... ...
@@ -0,0 +1,10 @@
0
+* XSLT stylesheet included from other stylesheet are not among dependencies
1
+  (if you modify html.common.xsl) then the html output won't be rebuilt
2
+
3
+* Support for man pages
4
+
5
+* Support for embedded css stylesheets in generated HTML documents
6
+
7
+* There is an issue with .d files, they are not sometimes regenerated when
8
+  one of the files included gets changed to a non-existent file and back
9
+  (maybe it happens only when you run make clean html)
0 10
\ No newline at end of file
1 11
new file mode 100644
... ...
@@ -0,0 +1,37 @@
0
+<?xml version="1.0"?>
1
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
2
+         "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
3
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
4
+	<!-- Uncomment the following entry if you have docbook DTDs in unusual
5
+	     location or if you would like to validate the documentation against
6
+	     newer docbook version -->
7
+	<!--
8
+	<public publicId="-//OASIS//DTD DocBook XML V4.3//EN"
9
+            uri="file:///home/janakj/docbook/dtd/docbookx.dtd"/>
10
+      -->
11
+
12
+    <!-- Uncomment the following entry if you have docbook XSL stylesheets in
13
+         unusual location, the value of rewritePrefix parameter should point
14
+         to the top level directory of your XSL stylesheets -->
15
+    <!--
16
+    <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/"
17
+                rewritePrefix="file:///home/janakj/docbook/xsl/"/>
18
+      -->
19
+
20
+    <!-- Try the system wide catalogs as the last step before reverting to
21
+         using the value of system identifiers and URI references from the
22
+         documents being processed (they usualy contain HTTP URIs). -->
23
+    <delegatePublic publicIdStartString="" catalog="file:///etc/xml/catalog"/>
24
+    <delegateURI    uriStartString=""      catalog="file:///etc/xml/catalog"/>
25
+
26
+    <!-- If xsltproc gets here while searching the catalog then no entry was
27
+         found in the catalog files for the requested resource and in this
28
+         case xsltproc will attempt to download the resource from the internet
29
+         using the HTTP protocol. It will use the HTTP URIs from system
30
+         identifiers and URI references (therefore the XSL customization
31
+         stylesheets in SR refer to the original XSL stylesheets using HTTP
32
+         URIs). Note: Downloading DTDs and XSL stylesheets can be very slow,
33
+         because each file will be downloaded several times, xsltproc does not
34
+         cache downloaded files.
35
+      -->
36
+</catalog>
0 37
similarity index 100%
1 38
rename from doc/stylesheets/common.xsl
2 39
rename to docbook/common.xsl
3 40
new file mode 100644
... ...
@@ -0,0 +1,48 @@
0
+<?xml version='1.0'?>
1
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2
+				version='1.0' xmlns:xi="http://www.w3.org/2001/XInclude">
3
+	
4
+	<xsl:param name="prefix"/>
5
+	<xsl:param name="output"/>
6
+	
7
+	<xsl:template match="/">
8
+		<xsl:document href="{$output}" method="text" indent="no" 
9
+					  omit-xml-declaration="yes">
10
+			<xsl:value-of select="concat($output, ': ')"/>
11
+			<xsl:apply-templates mode="subroot"/>
12
+		</xsl:document>
13
+	</xsl:template>
14
+	
15
+	<xsl:template name="get-prefix">
16
+		<xsl:if test="contains($prefix, '/')">
17
+			<xsl:value-of select="concat(substring-before($prefix, '/'), '/')"/>
18
+			<xsl:call-template name="get-prefix">
19
+				<xsl:with-param name="prefix" 
20
+								select="substring-after($prefix, '/')"/>
21
+			</xsl:call-template>
22
+		</xsl:if>
23
+	</xsl:template>
24
+	
25
+	<xsl:template match='xi:include' mode="subroot">
26
+		<xsl:value-of select="concat($prefix, concat(@href, ' '))"/>
27
+		<xsl:apply-templates select="document(@href)" mode="subroot">
28
+			<xsl:with-param name="prefix">
29
+				<xsl:call-template name="get-prefix">
30
+					<xsl:with-param name="prefix" 
31
+									select="concat($prefix, @href)"/>
32
+				</xsl:call-template>
33
+			</xsl:with-param>
34
+		</xsl:apply-templates>
35
+	</xsl:template>
36
+	
37
+	<xsl:template match='xi:include[@parse="text"]' mode="subroot">
38
+		<xsl:value-of select="concat($prefix, concat(@href, ' '))"/>
39
+	</xsl:template>
40
+	
41
+	<xsl:template match="graphic|imagedata|inlinemediaobject|textdata" 
42
+				  mode="subroot">
43
+		<xsl:value-of select="concat($prefix, concat(@fileref, ' '))"/>
44
+	</xsl:template>
45
+	
46
+	<xsl:template match="text()|@*" mode="subroot"/>
47
+</xsl:stylesheet>
0 48
similarity index 87%
1 49
rename from doc/kam_entities.xml
2 50
rename to docbook/entities.xml
... ...
@@ -1,8 +1,7 @@
1
-<!-- $Id: entities.xml 5591 2009-02-11 15:07:42Z henningw $ -->
2
-
3 1
 <!-- Entities often used in the documentation -->
4 2
 
5 3
 <!ENTITY fhg "FhG FOKUS">
4
+<!ENTITY iptel "<ulink url='http://iptel.org'>iptel.org</ulink>">
6 5
 
7 6
 <!ENTITY kamailio "Kamailio">
8 7
 <!ENTITY kamailioname "Kamailio SIP Server Platform">
... ...
@@ -33,12 +32,23 @@
33 33
 <!ENTITY develguide "Developer Guide">
34 34
 <!ENTITY faqguide "Frequently Asked Questions">
35 35
 
36
+<!ENTITY ser "SER">
37
+<!ENTITY sername "SIP Express Router">
38
+
39
+<!ENTITY serhome "http://iptel.org/ser">
40
+<!ENTITY serbugs "http://iptel.org/ser/bugs">
41
+<!ENTITY serusers "http://mail.iptel.org/mailman/listinfo/serusers">
42
+<!ENTITY serdev "http://mail.iptel.org/mailman/listinfo/serdev">
43
+
36 44
 <!ENTITY serhomelink "<ulink url='&serhome;'>&serhome;</ulink>">
37 45
 <!ENTITY serbugslink "<ulink url='&serbugs;'>&serbugs;</ulink>">
38 46
 <!ENTITY serhelplink "<ulink url='&serhelp;'>&serhelp;</ulink>">
39 47
 <!ENTITY seruserslink "<ulink url='&serusers;'>&serusers;</ulink>">
40 48
 <!ENTITY serdevlink "<ulink url='&serdev;'>&serdev;</ulink>">
41 49
 
50
+<!ENTITY serusersmail "<email>serusers@iptel.org</email>">
51
+<!ENTITY serdevmail "<email>serdev@iptel.org</email>">
52
+
42 53
 <!ENTITY defaultdb "mysql://openser:openserrw@localhost/openser">
43 54
 <!ENTITY defaultrodb "mysql://openserro:openserro@localhost/openser">
44 55
 <!ENTITY exampledb "dbdriver://username:password@dbhost/dbname">
... ...
@@ -74,4 +84,4 @@
74 74
 <!ENTITY rfc2543 "<ulink url='http://www.ietf.org/rfc/rfc2543.txt'>RFC2543</ulink>">
75 75
 
76 76
 <!ENTITY vsname "Voice Sistem SRL">
77
-<!ENTITY voicesystem "<ulink url='http://www.voice-system.ro'>voice-system.ro</ulink>">
77
+<!ENTITY voicesystem "<ulink url='http://www.voice-system.ro'>voice-system.ro</ulink>">
78 78
\ No newline at end of file
79 79
similarity index 90%
80 80
rename from doc/stylesheets/xhtml.chunked.xsl
81 81
rename to docbook/html.chunked.xsl
... ...
@@ -6,7 +6,7 @@
6 6
     <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
7 7
 
8 8
     <!-- Commmon XHTML customization -->
9
-    <xsl:import href="xhtml.common.xsl"/>
9
+    <xsl:import href="html.common.xsl"/>
10 10
 
11 11
 <!-- Chunking -->
12 12
     <xsl:param name="use.id.as.filename">yes</xsl:param>
13 13
similarity index 69%
14 14
rename from doc/stylesheets/xhtml.common.xsl
15 15
rename to docbook/html.common.xsl
... ...
@@ -2,7 +2,9 @@
2 2
 
3 3
 <!-- Common settings for generating XHTML output -->
4 4
 <xsl:stylesheet  
5
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
5
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
6
+	xmlns:xi="http://www.w3.org/2003/XInclude"
7
+	version="1.0">
6 8
 
7 9
    <!-- Stylesheets that override this one must import either onechunk.xsl
8 10
         or chunk.xsl
... ...
@@ -11,6 +13,8 @@
11 11
 <!-- Stylesheets common for all transformations (xhtml, txt, fo) -->
12 12
     <xsl:import href="common.xsl"/>
13 13
 
14
+	<xsl:param name="html.embedded.stylesheet"/>
15
+
14 16
     <xsl:output method="xml"/>
15 17
     
16 18
 <!-- HTML Customization -->
... ...
@@ -29,4 +33,12 @@
29 29
     <xsl:param name="chunker.output.indent">yes</xsl:param>
30 30
     <xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.0 Strict//EN</xsl:param>
31 31
     <xsl:param name="chunker.output.doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</xsl:param>
32
+
33
+	<xsl:template name="user.head.content">
34
+		<xsl:if test="$html.embedded.stylesheet != ''">
35
+			<xsl:text disable-output-escaping="yes">&lt;style type="text/css"&gt;</xsl:text>
36
+			<xsl:value-of select="$html.embedded.stylesheet"/>
37
+			<xsl:text disable-output-escaping="yes">&lt;style&gt;</xsl:text>
38
+		</xsl:if>
39
+	</xsl:template>
32 40
 </xsl:stylesheet>
33 41
similarity index 88%
34 42
rename from doc/stylesheets/xhtml.xsl
35 43
rename to docbook/html.xsl
... ...
@@ -6,5 +6,6 @@
6 6
     <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/onechunk.xsl"/>
7 7
 
8 8
     <!-- Common XHTML customization -->
9
-    <xsl:import href="xhtml.common.xsl"/>
9
+    <xsl:import href="html.common.xsl"/>
10
+
10 11
 </xsl:stylesheet>
11 12
similarity index 100%
12 13
rename from doc/stylesheets/serdoc2man.xsl
13 14
rename to docbook/man.xsl
14 15
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+<?xml version='1.0'?>
1
+<xsl:stylesheet  
2
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
+
4
+    <!-- Produce a single file when building parts of documentation -->
5
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
6
+
7
+    <!-- Import plain-text customization -->
8
+    <xsl:import href="txt.xsl"/>
9
+
10
+	<xsl:param name="section.autolabel">1</xsl:param>
11
+	<xsl:param name="section.label.includes.component.label">1</xsl:param>
12
+	<xsl:param name="generate.toc">book toc,title,figure,table,example</xsl:param>
13
+</xsl:stylesheet>
0 14
\ No newline at end of file
1 15
similarity index 87%
2 16
rename from doc/kam-module-docbook.css
3 17
rename to docbook/sr-doc.css
... ...
@@ -1,4 +1,4 @@
1
-BODY {
1
+body {
2 2
   padding: 20px;
3 3
   margin: 5px 50px 5px 50px;
4 4
   background: #ffffff;
... ...
@@ -8,35 +8,36 @@ BODY {
8 8
   font-family: Helvetica,Arial;
9 9
 }
10 10
 
11
-P {
11
+p {
12 12
   font-family: Helvetica,Arial;
13 13
   font-size: 12;
14 14
   text-align: justify;
15 15
 }
16 16
 
17
-P.C2 {
17
+p.c2 {
18 18
   COLOR: #ffffff ;
19 19
   BACKGROUND-color: #a0a0d0;
20 20
   BORDER: solid 1px #606090;
21 21
   PADDING: 1px
22 22
 }
23 23
 
24
-A {
24
+a {
25 25
   color: #041fc5;
26 26
   text-decoration: none;
27 27
 }
28 28
 
29
-A:hover {
29
+a:hover {
30 30
   color: #990000;
31 31
   text-decoration: underline;
32 32
 }
33 33
 
34
-DIV.ABSTRACT {
34
+div.abstract {
35 35
   border: solid 2px;
36 36
   padding-left: 10pt;
37 37
   padding-right: 10pt;
38 38
 }
39
-PRE.SCREEN {
39
+
40
+pre.screen {
40 41
   font-family:monospace;
41 42
   white-space: pre;
42 43
   background-color: #fefeee;
... ...
@@ -50,7 +51,7 @@ PRE.SCREEN {
50 50
   padding-left: 15pt;
51 51
 }
52 52
 
53
-PRE.PROGRAMLISTING {
53
+pre.programlisting {
54 54
   font-family:monospace;
55 55
   white-space: pre;
56 56
   background-color: #fefeee;
... ...
@@ -64,7 +65,7 @@ PRE.PROGRAMLISTING {
64 64
   padding-left: 15pt;
65 65
 }
66 66
 
67
-H1 {
67
+h1 {
68 68
   color: #000000;
69 69
   border: solid 2px #a0a0a0;
70 70
   background-color: #DCDCDC;
... ...
@@ -73,22 +74,22 @@ H1 {
73 73
   padding-left: 5px;
74 74
 }
75 75
 
76
-.TITLE a {
76
+.title a {
77 77
   color: #000000; 
78