This HOWTO is currently written with LyX version 1.1.6fix4 on a Red Hat Linux 7.2 system with template SGML (DocBook book). It's available on LDP-CVS / users / Peter-Bieringer for contribution.
Code line wrapping is done using selfmade utility "lyxcodelinewrapper.pl", you can get it from CVS for your own usage: LDP-CVS / users / Peter-Bieringer
SGML is generated using export function in LyX.
Also some fixes are have to be made to create proper SGML code (see also here for the Perl programs LDP-CVS / users / Peter-Bieringer):
Export of LyX table does not create proper "colspan" tags - tool for fixing: "sgmllyxtabletagfix.pl"
LyX sometimes uses special left/right entinities for quotes instead the normal one, which will still exist in generated HTML. Some browsers don't parse this very well (known: Opera 6 TP 2 or Konqueror) - tool for fixing: "sgmllyxquotefix.pl"