# a very limited debiandoc to xml converter # can also be used by itself on entity files, # for those uncomment next line: s//|/gi # ENTITY must upper case s||\ \2|gi # pick up halves of those that got wrapped to different lines s||gi s||url="\1">\2|gi s|^NAME=\"\([^\"]*\)\">|\1|gi # ID= at the start of a line can also be an orphan ref s|^ID=\"\(\&url[^\"]*\)\"|url="\1">|gi s|||gi s|<^ID=\"\([^\"]*\)\">|linkend="\1">|gi s|||gi s|

|
|gi s|HEADING>|title>|gi # An extra line is helpful when replacing with 2 tags s||\ |gi s||\ |gi s|\([^<]*\)|\1|gi s|||gi s|||gi s|ENUMLIST>|orderedlist>|gi s|TAGLIST>|variablelist>|gi s||\ |gi s|||gi s|||gi s|||gi s|||gi s|FILE>|filename>|gi s|CHAPT>|chapter>|gi s|CHAPT ID=|chapter id=|gi # xml has no plain , must be numbered # so move each one up a level s|SECT3>|sect4>|gi s|SECT2>|sect3>|gi s|SECT1>|sect2>|gi s|SECT>|sect1>|gi s|SECT3 ID=|sect4 id=|gi s|SECT2 ID=|sect3 id=|gi s|SECT1 ID=|sect2 id=|gi s|SECT ID=|sect1 id=|gi # locate sect's with text immediately following, insert s|\(<sect[^>]*>\)\([^<>]\+$\)|\1<title>\2|i # prgn could be , but use as default s|PRGN>|command>|gi # our s don't have headings, use s||\ |gi s||\ |gi s|VAR>|replaceable>|gi # has been used for many purposes, but it _should_ be s|TT>|userinput>|gi # no allowed, substitute for now s|PACKAGE>|classname>|g # just change the case s|FOOTNOTE>|footnote>|gi # # formatting stuff s| |\ \ |g # all to left margin on next line s|^ *\(.*\)|\ \1| s|^ *\(.*\)|\1| # sect's on next line, appropriate indent s|^ *\(