Difference between revisions of "Docbook"

From ArchWiki
Jump to: navigation, search
(Started docbook page)
m (Added categories)
Line 1: Line 1:
==Setting up Docbook in Arch==
==Setting up Docbook in Arch==

Revision as of 00:15, 24 July 2005

Setting up Docbook in Arch

To set up docbook running on arch:

$ pacman -S docbook-xml docbook-xsl libxslt libxml2

Assuming our docbook document is in File.xml. To validate the XML file use:

$ xmllint --valid --noout File.xml

This will generate no output if the file is proper XML.

Then, to convert into a XHTML file (single file) use:

xsltproc /usr/share/xml/docbook/xhtml/docbook.xsl File.xml > Output.html

To convert into a a segmented XHTML file (each section in its own file) use:

xsltproc /usr/share/xml/docbook/xhtml/chunk.xsl File.xml

And, of course, you can add these to ~/.bashrc(or similar shell startup file):

alias doc2html1="xsltproc /usr/share/xml/docbook/xhtml/docbook.xsl"
alias doc2multihtml="xsltproc /usr/share/xml/docbook/xhtml/chunk.xsl"
alias docvalidate="xmllint --valid --noout"