Text to XML

Output will be a full gramps.xml/gramps.sgml file with utf8 encoding to avoid non-ASCII characters issues. The present Makefiles in GRAMPS can create html/manual/pdf from these xml files. Possible solution for keeping docbook : OpenJade + DSSSL. Note that yelp may open xhtml too.

Convert all of your HTML to XHTML using Tidy. Enable 'enclose-block-text' in the configfile, else any unenclosed text (where this is allowed under XHTML Transitional but not under XHTML Strict) will vanish.

Use the XSL stylesheet (below) to convert the XHTML into DocBook (There's no way to merge the multiple XHTML files into a single document, so the stylesheet converts each HTML page into a section). Be sure to pass in the filename (minus the extension) as a parameter. This will become the section id.

Combine the multiple DocBooksection files into a single file, and re-arrange the sections into the proper order

Correct any validity errors. (At this point, there are likely to be a few, depending on how good the original HTML was.)

Missing headers (the heading logic isn't perfect. You'll lose at most 1 header per page, though, and most pages come through with all headers intact.)

Overuse of emphasis and emphasis role="bold"

html2db is a small utility to convert HTML to Docbook SGML/XML. It uses TidyLib for parsing the HTML.

HTML::ToDocBook is CPAN perl module who converts an XHTML file into DocBook.

Manual Text Guidelines

In order for the above scripts to work, we need to limit ourselves to a limited set of templates and syntax in the manual, as we cannot support everything. Hence, the Manual section does not have the full capabilities as a normal Mediawiki.

General textual guidelines

Only approved templates may be used. These are

{{grampsmanualcopyright}}: the copyright template. This will be stripped out on manual generation.

{{man label|Labels}}: template for GUI elements, example: Labels

{{man button|Buttons}}: template for GUI buttons Buttons

{{man tip| 1=title |2=text.}}: template to add a tip in the text

{{man note| title |text}}: template to add a note to the text

{{man warn| title |text}}: template to add a warning to the text

{{man index|prevpage|nextpage}}: template to add the bottom index bar. This will be stripped out on manual generation.

{{languages}}: template to add language bar. This will be stripped out on manual generation.