logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

docbook2texi-spec.pl - convert DocBook Booksto Texinfo documents

Description

docbook2texi is a sgmlspl spec file that produces GNU Texinfo documents from DocBook documents.

       The  program  reads  ESIS produced by onsgmls (or other SGML parsers) from standard input.  Currently the
       document element must be Book, otherwise the results are undefined.

       Its output, the converted Texinfo document, is written to standard output.

       The file basename.refs will also be created, which contains all the  nodes  in  the  document  and  their
       immediate  'child' nodes.  As node processing always require forward references, docbook2texi must be run
       twice for each document: the first time to build the references, and the second to  actually  generate  a
       valid document.

Limitations

       Trying docbook2man on non-DocBook or non-conformant SGML results in undefined behavior. :-)

       This program is a slow, dodgy Perl script.

       This  program does not come close to supporting all the possible markup in DocBook, and may produce wrong
       output in some cases with supported markup.

Name

       docbook2texi-spec.pl - convert DocBook Booksto Texinfo documents

Requirements

       The SGMLSpm package from CPAN.  This package includes the sgmlspl script that is also needed.

Synopsis

sgmlspldocbook2man-spec.plonsgmls [ sgmldocument ]|sgmlspldocbook2texi-spec.pl [ basename ]

To Do

       • How the hell do you represent a backslash (\) in Texinfo!!@?  I've tried \\ but TeX complains about it.

       • Fix breakages found in the test documents.

       • Add new element handling and fix existing handling.  Be robust.

       • Make it faster. I think most of the speed problems so far is with parsing ESIS.  Rewrite SGMLS.pm  with
         C and/or get input directly from SP.

       • There  are  some  dependencies  on elements occurring when they are actually optional (according to the
         DTD).  We need to fix that (preferably) or prominently state the requirements.

       • Allow other more common document elements.

       • Separate out node referencing to a separate script.   Not  only  would  it  make  it  faster/easier  to
         maintain because it's separate from the main code, but also I would like it to evolve into an automatic
         DocBook ToC generator.

See Also