summaryrefslogtreecommitdiff
path: root/docs-xml
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-04-24 23:40:51 +0400
committerKarolin Seeger <kseeger@samba.org>2008-04-25 12:53:42 +0200
commit4b74bf9c3c130a94c45dac455697b926fb99bcc8 (patch)
tree40a1d89ae58b7f5faa826ae9247f4f51ffa74bac /docs-xml
parent0f642f6da629714f32e3442cdf1dda8bd6e07cd9 (diff)
downloadsamba-4b74bf9c3c130a94c45dac455697b926fb99bcc8.tar.gz
Fix documentation build: manpages, links in the HTML documents.
Fixed manpages generation to properly create handle smb.conf parameters' titles Changed HTML generator to include links for every smb.conf parameter. Now we have correct linking between different HTML documents. Signed-off-by: Alexander Bokovoy <ab@samba.org> (cherry picked from commit 056935ff1f5fefc3ca42f7006182fc80c94d91ab)
Diffstat (limited to 'docs-xml')
-rw-r--r--docs-xml/Makefile6
-rw-r--r--docs-xml/configure.ac2
-rwxr-xr-xdocs-xml/smbdotconf/generate-file-list.sh4
-rw-r--r--docs-xml/xslt/expand-sambadoc.xsl13
-rw-r--r--docs-xml/xslt/expand-smbconfdoc.xsl63
-rw-r--r--docs-xml/xslt/html-common.xsl2
-rw-r--r--docs-xml/xslt/man.xsl2
7 files changed, 57 insertions, 35 deletions
diff --git a/docs-xml/Makefile b/docs-xml/Makefile
index 1e4121053d8..0f401d6c456 100644
--- a/docs-xml/Makefile
+++ b/docs-xml/Makefile
@@ -59,7 +59,7 @@ clean:
rm -f $(patsubst %.svg,%.png,$(foreach DOC,$(MAIN_DOCS),$($(DOC)-images-latex-dia))) \
$(patsubst %.svg,%.pdf,$(foreach DOC,$(MAIN_DOCS),$($(DOC)-images-latex-svg))) \
$(patsubst %.svg,%.eps,$(foreach DOC,$(MAIN_DOCS),$($(DOC)-images-latex-svg)))
- rm -f *.xml *.d *.tpt *.tex *.loc *.toc *.lof *.glo *.idx *.aux
+ rm -f *-attributions.xml *.d *.tpt *.tex *.loc *.toc *.lof *.glo *.idx *.aux
rm -f *-images-html*
rm -f *-images-latex-* latexfigures
rm -f xslt/figures/*pdf
@@ -92,11 +92,11 @@ validate: $(addsuffix -validate,$(MAIN_DOCS))
$(DOCBOOKDIR)/%.xml: %/index.xml xslt/expand-sambadoc.xsl
@echo "Converting Samba-specific tags for $*..."
@mkdir -p $(@D)
- $(XSLTPROC) --stringparam latex.imagebasedir "$*/" --stringparam noreference 1 --xinclude --output $@ xslt/expand-sambadoc.xsl $<
+ $(XSLTPROC) --stringparam latex.imagebasedir "$*/" --stringparam noreference 0 --xinclude --output $@ xslt/expand-sambadoc.xsl $<
$(DOCBOOKDIR)/manpages-3/%.xml: $(MANPAGEDIR3)/%.xml xslt/expand-sambadoc.xsl
@mkdir -p $(@D)
- $(XSLTPROC) --xinclude --stringparam noreference 1 --output $@ xslt/expand-sambadoc.xsl $<
+ $(XSLTPROC) --xinclude --stringparam noreference 0 --output $@ xslt/expand-sambadoc.xsl $<
$(DOCBOOKDIR)/manpages-3/index.xml: $(MANPAGES3) xslt/manpage-summary.xsl
@mkdir -p $(@D)
diff --git a/docs-xml/configure.ac b/docs-xml/configure.ac
index 97c2b2201fe..c0d66867424 100644
--- a/docs-xml/configure.ac
+++ b/docs-xml/configure.ac
@@ -94,4 +94,4 @@ fi
AC_SUBST(TARGETS)
-AC_OUTPUT( Makefile.settings)
+AC_OUTPUT( Makefile.settings build/catalog.xml)
diff --git a/docs-xml/smbdotconf/generate-file-list.sh b/docs-xml/smbdotconf/generate-file-list.sh
index 262830de4ba..68b2abe72fc 100755
--- a/docs-xml/smbdotconf/generate-file-list.sh
+++ b/docs-xml/smbdotconf/generate-file-list.sh
@@ -8,12 +8,12 @@ fi
OLD=`pwd`
cd $DIR
-echo "<variablelist xmlns:xi=\"http://www.w3.org/2003/XInclude\">"
+echo "<section xmlns:xi=\"http://www.w3.org/2003/XInclude\">"
for I in `find . -mindepth 2 -type f -name '*.xml' | sort -t/ -k3 | xargs`
do
echo "<xi:include href='$I' parse='xml'/>"
done
-echo "</variablelist>"
+echo "</section>"
cd $OLD
diff --git a/docs-xml/xslt/expand-sambadoc.xsl b/docs-xml/xslt/expand-sambadoc.xsl
index 5b539df54a5..2b881490f4f 100644
--- a/docs-xml/xslt/expand-sambadoc.xsl
+++ b/docs-xml/xslt/expand-sambadoc.xsl
@@ -7,6 +7,7 @@
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"
+ xmlns:xlink='http://www.w3.org/1999/xlink'
version="1.1">
<xsl:output method="xml" encoding="UTF-8" doctype-public="-//OASIS//DTD DocBook XML V4.2//EN" indent="yes" doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/>
@@ -21,7 +22,7 @@
</xsl:copy>
</xsl:template>
- <xsl:template name="smbconfoption">
+ <xsl:template name="xsmbconfoption">
<xsl:param name="name"/>
<xsl:param name="content"/>
<xsl:variable name="linkcontent">
@@ -45,10 +46,12 @@
<xsl:value-of select="$linkcontent"/>
</xsl:when>
<xsl:otherwise>
+ <xsl:variable name="newid"><xsl:value-of select="translate(translate(string($name),' ',''),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></xsl:variable>
<xsl:element name="link">
<xsl:attribute name="linkend">
- <xsl:value-of select="translate(translate(string($name),' ',''),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+ <xsl:value-of select="$newid"/>
</xsl:attribute>
+ <xsl:attribute name="xlink:href">smb.conf.5.html#<xsl:value-of select="$newid"/></xsl:attribute>
<xsl:value-of select="$linkcontent"/>
</xsl:element>
</xsl:otherwise>
@@ -58,7 +61,7 @@
<xsl:template match="related">
<xsl:element name="para">
<xsl:text>Related command: </xsl:text>
- <xsl:call-template name="smbconfoption">
+ <xsl:call-template name="xsmbconfoption">
<xsl:with-param name="name" select="text()"/>
</xsl:call-template>
</xsl:element>
@@ -100,9 +103,9 @@
</xsl:template>
<xsl:template match="smbconfoption">
- <xsl:call-template name="smbconfoption">
+ <xsl:call-template name="xsmbconfoption">
<xsl:with-param name="name" select="@name"/>
- <xsl:with-param name="content"><xsl:copy-of select="text()"/></xsl:with-param>
+ <xsl:with-param name="content" select="text()"/>
</xsl:call-template>
</xsl:template>
diff --git a/docs-xml/xslt/expand-smbconfdoc.xsl b/docs-xml/xslt/expand-smbconfdoc.xsl
index 5472d61a9af..3e3dbe19fbb 100644
--- a/docs-xml/xslt/expand-smbconfdoc.xsl
+++ b/docs-xml/xslt/expand-smbconfdoc.xsl
@@ -53,11 +53,11 @@
</xsl:variable>
<xsl:variable name="term">
- <xsl:element name="indexterm">
<xsl:copy-of select="$anchor"/>
- <xsl:value-of select="@name"/>
- <xsl:value-of select="$context"/>
- </xsl:element>
+ <xsl:element name="title">
+ <xsl:value-of select="@name"/>
+ <xsl:value-of select="$context"/>
+ </xsl:element>
</xsl:variable>
@@ -120,8 +120,7 @@
</xsl:variable>
<xsl:for-each select="synonym">
- <xsl:element name="varlistentry">
- <xsl:text>&#10;</xsl:text>
+ <xsl:element name="section">
<xsl:element name="indexterm">
<xsl:attribute name="significance">
<xsl:text>preferred</xsl:text>
@@ -133,7 +132,7 @@
<xsl:value-of select="$name"/>
</xsl:element>
</xsl:element>
- <xsl:element name="term">
+ <xsl:element name="title">
<xsl:element name="anchor">
<xsl:attribute name="id">
<xsl:value-of select="translate(translate(string(.),' ',''), 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
@@ -141,28 +140,46 @@
</xsl:element>
<xsl:value-of select="."/>
</xsl:element>
- <xsl:element name="listitem">
- <xsl:element name="para"><xsl:text>This parameter is a synonym for </xsl:text><xsl:copy-of select="$name"/><xsl:text>.</xsl:text></xsl:element>
+ <xsl:element name="variablelist">
+ <xsl:element name="varlistentry">
+ <xsl:element name="listitem">
+ <xsl:element name="para">
+ <xsl:text>This parameter is a synonym for </xsl:text>
+ <xsl:element name="link">
+ <xsl:attribute name="linkend">
+ <xsl:value-of select="translate(translate(string($name),' ',''), 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+ </xsl:attribute>
+ <xsl:value-of select="$name"/>
+ </xsl:element>
+ <xsl:text>.</xsl:text>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
</xsl:element>
+ <xsl:text>&#10;</xsl:text>
</xsl:element>
</xsl:for-each>
- <xsl:element name="varlistentry">
- <xsl:text>&#10;</xsl:text>
- <xsl:element name="indexterm">
- <xsl:attribute name="significance">
- <xsl:text>preferred</xsl:text>
- </xsl:attribute>
- <xsl:element name="primary">
- <xsl:value-of select="@name"/>
+ <xsl:element name="section">
+ <xsl:element name="indexterm">
+ <xsl:attribute name="significance">
+ <xsl:text>preferred</xsl:text>
+ </xsl:attribute>
+ <xsl:element name="primary">
+ <xsl:value-of select="@name"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:copy-of select="$term"/>
+ <xsl:element name="variablelist">
+ <xsl:element name="varlistentry">
+ <xsl:element name="listitem">
+ <xsl:copy-of select="$content"/> <xsl:text>&#10;</xsl:text>
+ <xsl:copy-of select="$default"/> <xsl:text>&#10;</xsl:text>
+ <xsl:copy-of select="$examples"/> <xsl:text>&#10;</xsl:text>
+ </xsl:element>
</xsl:element>
</xsl:element>
- <xsl:copy-of select="$term"/>
- <xsl:element name="listitem">
- <xsl:copy-of select="$content"/> <xsl:text>&#10;</xsl:text>
- <xsl:copy-of select="$default"/> <xsl:text>&#10;</xsl:text>
- <xsl:copy-of select="$examples"/> <xsl:text>&#10;</xsl:text>
- </xsl:element>
+ <xsl:text>&#10;</xsl:text>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
diff --git a/docs-xml/xslt/html-common.xsl b/docs-xml/xslt/html-common.xsl
index b584214cd71..d2609d5c5b9 100644
--- a/docs-xml/xslt/html-common.xsl
+++ b/docs-xml/xslt/html-common.xsl
@@ -10,7 +10,7 @@
<xsl:param name="bridgehead.in.toc" select="1"/>
<xsl:param name="citerefentry.link" select="'1'"/>
<xsl:param name="css.decoration" select="1"/>
-<xsl:param name="html.stylesheet" select="'samba.css'"/>
+<xsl:param name="html.stylesheet" select="'../samba.css'"/>
<xsl:param name="html.stylesheet.type">text/css</xsl:param>
<xsl:param name="use.extensions" select="'0'"/>
<xsl:param name="use.id.as.filename" select="'1'"/>
diff --git a/docs-xml/xslt/man.xsl b/docs-xml/xslt/man.xsl
index 99b2112cb3a..e259004330c 100644
--- a/docs-xml/xslt/man.xsl
+++ b/docs-xml/xslt/man.xsl
@@ -1,6 +1,7 @@
<?xml version='1.0'?>
<!-- vim:set sts=2 shiftwidth=2 syntax=xml: -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xlink='http://www.w3.org/1999/xlink'
version='1.0'>
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/>
@@ -8,6 +9,7 @@
<xsl:param name="chunk.section.depth" select="0"/>
<xsl:param name="chunk.first.sections" select="1"/>
<xsl:param name="use.id.as.filename" select="1"/>
+<xsl:param name="man.endnotes.are.numbered" select="0"/>
<!--
Our ulink stylesheet omits @url part if content was specified