Re: [docbook-apps] DocBook/XML --> [tgn]roff

From
Daniel Veillard <>
Date
2003-04-25T18:44:17+00:00
ID
Thread
Re: [docbook-apps] DocBook/XML --> [tgn]roff
On Fri, Apr 25, 2003 at 09:05:23AM -0500, Dennis Grace wrote:
> I agree with Yann and Tilly: the jade wrapper (docbook2man) won't work with
> XML. In fact, docbook2man can just barely be said to work with SGML. It
> relies on a fairly simple perl script, which does not institute even one
> tenth of the functionality offered by the DocBook refentry subset.

  Well basically if you have the DocBook catalogs set-up, simply
adding a stylesheet PI after the xml declaration referencing the
manpages/docbook.xsl it's just a matter of calling xsltproc on
the xml:

paphio:~/XML/doc -> head -4 xmllint.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"
   href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
paphio:~/XML/doc -> xsltproc xmllint.xml
Writing xmllint.1 for refentry
paphio:~/XML/doc ->

  Very easy to automate from makefiles too:

xmllint.1: xmllint.xml
	-@(xsltproc xmllint.xml)

Now I just need to find a way to automate the generation of the XML
describing the command and options <grin/>

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/