diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/docbook-html-style.xsl | 40 | ||||
-rw-r--r-- | doc/docbook-text-style.xsl | 70 | ||||
-rw-r--r-- | doc/makefile | 30 | ||||
-rw-r--r-- | doc/po4a.conf | 28 |
4 files changed, 139 insertions, 29 deletions
diff --git a/doc/docbook-html-style.xsl b/doc/docbook-html-style.xsl new file mode 100644 index 000000000..e4af9f557 --- /dev/null +++ b/doc/docbook-html-style.xsl @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <!-- Import our base stylesheet --> + <xsl:import href="/usr/share/xml/docbook/stylesheet/docbook-xsl/xhtml-1_1/chunk.xsl" /> + + <!-- Since we use xsltproc (not saxon), add a workaround to ensure UTF-8 --> + <xsl:template xmlns="http://www.w3.org/1999/xhtml" name="head.content.generator"> + <xsl:param name="node" select="."/> + <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + </xsl:template> + + <xsl:template name="generate.html.title"/> + + <xsl:template match="releaseinfo" mode="titlepage.mode"> + <xsl:apply-imports/> + <hr/> + </xsl:template> + + <xsl:param name="root.filename">index</xsl:param> + + <!-- We do not want a title in HTML. --> + <xsl:param name="generate.meta.abstract" select="0"/> + + <!-- We do not want the first subsection on the same page as content. --> + <xsl:param name="chunk.first.sections" select="0"/> + <xsl:param name="chunk.section.depth" select="0"/> + <xsl:param name="chunker.output.indent" select="'yes'"/> + + <xsl:param name="use.id.as.filename" select="1"/> + + <xsl:param name="toc.section.depth" select="1"/> + <xsl:param name="generate.section.toc.level" select="0"/> + <xsl:param name="section.label.includes.component.label" select="1"/> + <xsl:param name="section.autolabel" select="1"/> + + <xsl:param name="generate.css.header" select="1"/> + +</xsl:stylesheet> diff --git a/doc/docbook-text-style.xsl b/doc/docbook-text-style.xsl new file mode 100644 index 000000000..376dded52 --- /dev/null +++ b/doc/docbook-text-style.xsl @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:import href="/usr/share/xml/docbook/stylesheet/docbook-xsl/xhtml-1_1/docbook.xsl" /> + + <!-- Parameters for optimal text output. --> + <xsl:param name="callout.graphics" select="0"/> + <xsl:param name="callout.unicode" select="0"/> + <xsl:param name="section.autolabel" select="1"/> + <xsl:param name="section.label.includes.component.label" select="1"/> + + <!-- Centering and aligning title elements. --> + <xsl:template match="/*/title[position()=1]" mode="titlepage.mode"> + <br/> + <center> + <xsl:apply-imports/> + </center> + <br/> + <hr/> <!-- No underline, but at least something. --> + </xsl:template> + <xsl:template match="author|editor" mode="titlepage.mode"> + <center> + <xsl:apply-imports/> + </center> + </xsl:template> + + <xsl:template match="releaseinfo" mode="titlepage.mode"> + <center> + <xsl:apply-imports/> + </center> + <hr/> + </xsl:template> + + <!-- Dirty hack to get a left margin for paragraphs etc. --> + <xsl:template match="legalnotice/* + |chapter/*[not(name(.)='section') and not(name(.)='title')] + |section/*[not(name(.)='section') and not(name(.)='title')] + |appendix/*[not(name(.)='section') and not(name(.)='title')] + |footnote/*"> + <xsl:copy><table><tr><td>   </td><td> + <xsl:apply-imports/> + </td></tr></table></xsl:copy> + </xsl:template> + + <!-- Skip URLs if it has something to print. --> + <xsl:template match="ulink[.!='']"> + <xsl:copy-of select="."/> + </xsl:template> + <!-- Print URLs if nothing to print. --> + <xsl:template match="ulink[.='']"> + <xsl:value-of select="@url"/> + </xsl:template> + + <!-- Make clear where notes etc. begin and end. --> + <xsl:template match="caution|important|note|tip|warning"> + <table width="80%" border="1"> + <colgroup> + <col align="justify"/> + </colgroup> + <tbody> + <tr> + <td align="justify"> + <xsl:apply-imports/> + </td> + </tr> + </tbody> + </table> + </xsl:template> + +</xsl:stylesheet> diff --git a/doc/makefile b/doc/makefile index 3939c749f..5ab31ad3b 100644 --- a/doc/makefile +++ b/doc/makefile @@ -5,12 +5,12 @@ SUBDIR=doc # Bring in the default rules include ../buildlib/defaults.mak -# Debian Doc SGML Documents -SOURCE = $(wildcard *.sgml) -DEBIANDOC_HTML_OPTIONS=-l en.UTF-8 -include $(DEBIANDOC_H) +# DocBook XML Documents +SOURCE = $(wildcard *.dbk) +LC = en +include $(DOCBOOK_H) -doc: manpages debiandoc +doc: manpages docbook examples/sources.list: ../vendor/current/sources.list ln -sf $(shell readlink -f $^) $@ @@ -24,12 +24,12 @@ TO = $(DOC) TARGET = binary include $(COPY_H) -.PHONY: clean clean/subdirs veryclean veryclean/subdirs manpages/subdirs debiandoc/subdirs all binary doc stats +.PHONY: clean clean/subdirs veryclean veryclean/subdirs manpages/subdirs docbook/subdirs all binary doc stats clean: clean/subdirs clean/examples veryclean: veryclean/subdirs clean/examples manpages: apt-vendor.ent manpages/subdirs -debiandoc: debiandoc/subdirs +docbook: docbook/subdirs DOCUMENTATIONPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po))) DOCDIRLIST = $(addsuffix /makefile,$(DOCUMENTATIONPO)) @@ -39,7 +39,7 @@ $(DOCDIRLIST) :: %/makefile : lang.makefile test -d $(dir $@) || mkdir $(dir $@) sed "s#@@LANG@@#$(subst /,,$(dir $@))#" $< > $@ -debiandoc/subdirs manpages/subdirs clean/subdirs veryclean/subdirs: +docbook/subdirs manpages/subdirs clean/subdirs veryclean/subdirs: for dir in en $(dir $(DOCDIRLIST)); do \ $(MAKE) -C $$dir $(patsubst %/subdirs,%,$@); \ done @@ -53,11 +53,11 @@ stats: ifdef PO4A MANPAGEPOLIST = $(addprefix manpages-translation-,$(DOCUMENTATIONPO)) -DEBIANDOCPOLIST = $(addprefix debiandoc-translation-,$(DOCUMENTATIONPO)) +DOCBOOKPOLIST = $(addprefix docbook-translation-,$(DOCUMENTATIONPO)) -.PHONY: update-po po4a $(MANPAGEPOLIST) $(DEBIANDOCPOLIST) $(DOCDIRLIST) +.PHONY: update-po po4a $(MANPAGEPOLIST) $(DOCBOOKPOLIST) $(DOCDIRLIST) -po4a: manpages/subdirs debiandoc/subdirs +po4a: manpages/subdirs docbook/subdirs update-po: po4a --previous --no-backups --force --no-translations \ @@ -78,10 +78,10 @@ $(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a.conf --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \ --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf -debiandoc/subdirs: $(DEBIANDOCPOLIST) -$(DEBIANDOCPOLIST) :: debiandoc-translation-% : %/makefile po4a.conf +docbook/subdirs: $(DOCBOOKPOLIST) +$(DOCBOOKPOLIST) :: docbook-translation-% : %/makefile po4a.conf po4a --previous --no-backups --translate-only $(dir $<)apt.ent \ - $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.sgml,%.$(subst /,,$(dir $<)).sgml,$(wildcard *.sgml))) \ + $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.dbk,%.$(subst /,,$(dir $<)).dbk,$(wildcard *.dbk))) \ --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \ --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf endif @@ -101,5 +101,5 @@ $(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile $(DOXYGEN) $(BUILD)/doc/Doxyfile touch $(BUILD)/doc/doxygen-stamp -debiandoc: $(BUILD)/doc/doxygen-stamp +docbook: $(BUILD)/doc/doxygen-stamp endif diff --git a/doc/po4a.conf b/doc/po4a.conf index 3f92c198a..636cac9b9 100644 --- a/doc/po4a.conf +++ b/doc/po4a.conf @@ -27,18 +27,18 @@ [type: manpage] apt-sortpkgs.1.xml $lang:$lang/apt-sortpkgs.$lang.1.xml add_$lang:xml.add [type: manpage] apt-ftparchive.1.xml $lang:$lang/apt-ftparchive.$lang.1.xml add_$lang:xml.add -[type: sgml] guide.sgml $lang:$lang/guide.$lang.sgml -# add_$lang::$lang/addendum/debiandoc_$lang.add -[type: sgml] offline.sgml $lang:$lang/offline.$lang.sgml -# add_$lang::$lang/addendum/debiandoc_$lang.add -#[type: sgml] cache.sgml $lang:$lang/cache.$lang.sgml \ -# add_$lang::$lang/addendum/debiandoc_$lang.add -#[type: sgml] design.sgml $lang:$lang/design.$lang.sgml\ -# add_$lang::$lang/addendum/debiandoc_$lang.add -#[type: sgml] dpkg-tech.sgml $lang:$lang/dpkg-tech.$lang.sgml\ -# add_$lang::$lang/addendum/debiandoc_$lang.add -#[type: sgml] files.sgml $lang:$lang/files.$lang.sgml\ -# add_$lang::$lang/addendum/debiandoc_$lang.add -#[type: sgml] method.sgml $lang:$lang/method.$lang.sgml\ -# add_$lang::$lang/addendum/debiandoc_$lang.add +[type: docbook] guide.dbk $lang:$lang/guide.$lang.dbk +# add_$lang::$lang/addendum/docbook_$lang.add +[type: docbook] offline.dbk $lang:$lang/offline.$lang.dbk +# add_$lang::$lang/addendum/docbook_$lang.add +#[type: docbook] cache.dbk $lang:$lang/cache.$lang.dbk \ +# add_$lang::$lang/addendum/docbook_$lang.add +#[type: docbook] design.dbk $lang:$lang/design.$lang.dbk\ +# add_$lang::$lang/addendum/docbook_$lang.add +#[type: docbook] dpkg-tech.dbk $lang:$lang/dpkg-tech.$lang.dbk\ +# add_$lang::$lang/addendum/docbook_$lang.add +#[type: docbook] files.dbk $lang:$lang/files.$lang.dbk\ +# add_$lang::$lang/addendum/docbook_$lang.add +#[type: docbook] method.dbk $lang:$lang/method.$lang.dbk\ +# add_$lang::$lang/addendum/docbook_$lang.add |