diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-12-07 16:54:57 +0000 |
---|---|---|
committer | Gerald W. Carter <jerry@samba.org> | 2008-04-23 08:46:09 -0500 |
commit | ca63ae57c0f25def3f7dcf3264d91f93285e739b (patch) | |
tree | 58fd47b639481a6a7cfda14975cd0766290482c8 /docs | |
parent | 9cab43f5b9a7da5912d4478b0d461653ec4d38a6 (diff) | |
download | samba-ca63ae57c0f25def3f7dcf3264d91f93285e739b.tar.gz samba-ca63ae57c0f25def3f7dcf3264d91f93285e739b.tar.bz2 samba-ca63ae57c0f25def3f7dcf3264d91f93285e739b.zip |
- Fix manpage index file (#2109)
- Fix plucker (Palm Documentation Format) output
(This used to be commit 8a4ab0776b5905d792116706a0de4ffbbb315f4b)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Makefile.in | 8 | ||||
-rw-r--r-- | docs/Samba-Developers-Guide/index.xml | 2 | ||||
-rw-r--r-- | docs/Samba-Guide/index.xml | 2 | ||||
-rw-r--r-- | docs/xslt/docbook2pearson.xsl | 104 |
4 files changed, 75 insertions, 41 deletions
diff --git a/docs/Makefile.in b/docs/Makefile.in index dc3a8dd0da..f19fa05d81 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -54,7 +54,7 @@ MANPAGES = $(wildcard $(MANPAGEDIR)/*.?.xml) # Lists of files to process LATEX_FIGURES = xslt/figures/caution.pdf xslt/figures/important.pdf xslt/figures/note.pdf xslt/figures/tip.pdf xslt/figures/warning.pdf -MANPAGES_PLUCKER = $(patsubst $(MANPAGEDIR)/%.xml,$(PLUCKERDIR)/%.pdb,$(MANPAGES_SOURCES)) +MANPAGES_PLUCKER = $(patsubst $(MANPAGEDIR)/%.xml,$(PLUCKERDIR)/%.pdb,$(MANPAGES)) help: @echo "Supported make targets:" @@ -104,10 +104,10 @@ $(DOCBOOKDIR)/%.xml: $(MANPAGEDIR)/%.xml xslt/expand-sambadoc.xsl mkdir -p $(@D) $(XSLTPROC) --xinclude --stringparam latex.imagebasedir "$*/" --stringparam noreference 1 --output $@ xslt/expand-sambadoc.xsl $< -$(DOCBOOKDIR)/manpages.xml: $(MANPAGES_SOURCES) xslt/manpage-summary.xsl +$(DOCBOOKDIR)/manpages.xml: $(MANPAGES) xslt/manpage-summary.xsl mkdir -p $(@D) echo "<article><variablelist>" > $@ - for I in $(MANPAGES_SOURCES); do $(XSLTPROC) xslt/manpage-summary.xsl $$I >> $@; done + for I in $(MANPAGES); do $(XSLTPROC) xslt/manpage-summary.xsl $$I >> $@; done echo "</variablelist></article>" >> $@ # HTML docs @@ -209,7 +209,7 @@ $(HTMLHELPDIR)/%: $(DOCBOOKDIR)/%.xml $(XSLTPROC) --stringparam htmlhelp.chm $*.chm --stringparam manifest.in.base.dir "$@/" --stringparam base.dir "$@/" http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl $< # Plucker docs -$(PLUCKERDIR)/%.pdb: $(HTMLDIR)/%.html $(PLUCKERDIR) +$(PLUCKERDIR)/%.pdb: $(HTMLDIR)/%.html mkdir -p $(@D) $(PLUCKERBUILD) -v -M1 --stayonhost --noimages --zlib-compression -H file:$< -f $* -p $(PLUCKERDIR) diff --git a/docs/Samba-Developers-Guide/index.xml b/docs/Samba-Developers-Guide/index.xml index dfbe726a13..82baa05cc5 100644 --- a/docs/Samba-Developers-Guide/index.xml +++ b/docs/Samba-Developers-Guide/index.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!DOCTYPE book PUBLIC "-//samba//DTD Samba XML V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc" [ <!ENTITY % globalentities SYSTEM '../entities/global.entities'> %globalentities; ]> diff --git a/docs/Samba-Guide/index.xml b/docs/Samba-Guide/index.xml index 5afff71f26..132af17ce5 100644 --- a/docs/Samba-Guide/index.xml +++ b/docs/Samba-Guide/index.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!DOCTYPE book PUBLIC "-//Samba//DTD Samba XML V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc" [
<!-- entities files to use -->
<!ENTITY % global_entities SYSTEM '../entities/global.entities'>
diff --git a/docs/xslt/docbook2pearson.xsl b/docs/xslt/docbook2pearson.xsl index d276d31991..4a4158fa40 100644 --- a/docs/xslt/docbook2pearson.xsl +++ b/docs/xslt/docbook2pearson.xsl @@ -53,7 +53,7 @@ </xsl:if> </xsl:template> - <xsl:template match="/"> + <xsl:template match="/" mode="default"> <xsl:processing-instruction name="xml-stylesheet">href="pearson.css" type="text/css"</xsl:processing-instruction> @@ -85,24 +85,30 @@ </bookinfo> </xsl:template> - <xsl:template match="bookinfo/author"> - <!-- author> - <xsl:apply-templates/> - </author --> -</xsl:template> + <xsl:template match="author"> + <author> + <xsl:apply-templates/> + </author> + </xsl:template> -<xsl:template match="chapter"> - <chapter> - <xsl:call-template name="transform.id.attribute"/> - <xsl:apply-templates/> - </chapter> -</xsl:template> + <xsl:template match="editor"> + <editor> + <xsl:apply-templates/> + </editor> + </xsl:template> + + <xsl:template match="chapter"> + <chapter> + <xsl:call-template name="transform.id.attribute"/> + <xsl:apply-templates/> + </chapter> + </xsl:template> -<xsl:template match="chapter/title/command"> - <xsl:apply-templates/> -</xsl:template> + <xsl:template match="chapter/title/command"> + <xsl:apply-templates/> + </xsl:template> - <xsl:template match="index"> + <xsl:template match="index"> <xsl:comment> XXX insert index here </xsl:comment> </xsl:template> @@ -154,16 +160,54 @@ <title><xsl:apply-templates/></title> </xsl:template> + <xsl:param name="notpchilds" select="'variablelist itemizedlist orderedlist'"/> + + <xsl:template match="para"> + <!-- loop thru all elements: --> + <xsl:for-each select="*|text()"> + <xsl:choose> + <xsl:when test="string-length(name(.)) > 0 and contains($notpchilds,name(.))"> + <xsl:message><xsl:text>Removing from p:</xsl:text><xsl:value-of select="name(.)"/></xsl:message> + <xsl:apply-templates select="."/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="hstartpara"/> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + </xsl:template> - <xsl:template match="para"> - <p><xsl:apply-templates/></p> - <!-- p><xsl:apply-templates><value-of - select="normalize-space()"/></xsl:apply-templates></p --> - </xsl:template> + <!-- Do open paragraph when previous sibling was not a valid p child --> + <xsl:template name="hstartpara"> + <xsl:if test="not(preceding-sibling::*[1]) or (contains($notpchilds,name(preceding-sibling::*[1])) and not(string-length(name(.)) > 0))"> + <p> + <xsl:apply-templates select="."/> + <xsl:for-each select="following-sibling::*[not(contains($notpchilds,name(.)) and string-length(name(.)) > 0)]"> + <xsl:apply-templates select="."/> + </xsl:for-each> + </p> + </xsl:if> + </xsl:template> - <xsl:template match="tip"> - <tip><xsl:apply-templates/></tip> - </xsl:template> + <xsl:template name="hsubpara"> + <xsl:param name="data"/> + <xsl:apply-templates select="$data"/> + <xsl:if test="$data[following-sibling::*[1]]"> + <xsl:param name="next" select="$data[following-sibling::*[1]]"/> + <xsl:message><xsl:value-of select="name(.)"/></xsl:message> + <xsl:if test="$next and (not(contains($notpchilds,name($next))) or $next[text()])"> + <xsl:message><xsl:text>Followed by : </xsl:text><xsl:value-of select="name($next)"/></xsl:message> + <xsl:call-template name="hsubpara"> + <xsl:with-param name="data" select="$next"/> + </xsl:call-template> + <xsl:message><xsl:text>Done Followed by : </xsl:text><xsl:value-of select="name($next)"/></xsl:message> + </xsl:if> + </xsl:if> + </xsl:template> + + <xsl:template match="tip"> + <tip><xsl:apply-templates/></tip> + </xsl:template> <xsl:template match="warning|important|caution"> <stop><xsl:apply-templates/></stop> @@ -819,18 +863,8 @@ match="quote"><quote><xsl:apply-templates/></quote></xsl:template --> - <!-- Literaturverzeichnis --> - <xsl:template match="author"> - <xsl:apply-templates/>, - </xsl:template> - - <xsl:template match="editor"> - <!--FIXME: More information referring to editor ? --> - <xsl:apply-templates/>, - </xsl:template> - <xsl:template match="othername"> - <xsl:apply-templates/> + <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>0 </xsl:template> <xsl:template match="firstname"> <xsl:apply-templates/><xsl:text> </xsl:text> |