DocBook XML export

MediaWiki 1.1.0 has a feature for exporting articles to a simplified XML format which wraps the raw wikitext with revision metadata (author, timestamp, comment, title). This proposal is for supplementing this feature with an export to DocBook XML.

Rationale
DocBook XML is a standard for marking up books and articles in XML. The original standard began in the early 1990s, as an interchange format for printers and desktop-publishing software, and was tuned for creating software documentation. It has become a de facto standard for marking up formatted text documents of all kinds.

Using a standard XML markup for MediaWiki means that we can leverage other work in the field of document processing. There are a number of existing tools -- Open Source and proprietary -- for converting DocBook XML to other formats, such as Rich Text Format, PostScript, and PDF. Some word processors, such as OpenOffice, now support DocBook as an input and output format.

DocBook is a very large markup language -- it has something like 400+ elements in the Document Type Definition (DTD). A more abbreviated version, Simplified DocBook, removes a number of redundant elements. It would probably be sufficient for MediaWiki articles.

Paragraph blocks

 * paragraph &rarr; &lt;para&gt;
 * italics &rarr; &lt;emphasis&gt;

Section headings

 * =heading 1= &rarr; &lt;sect1&gt;
 * ==heading 2== &rarr; &lt;sect2&gt;
 * ===heading 3=== &rarr; &lt;sect3&gt;
 * ====heading 4==== &rarr; &lt;sect4&gt;
 * =====heading 5===== &rarr; &lt;sect5&gt;

An alternative is to use the recursive &lt;section&gt;, which is currently preferred for DocBook. However, this might be difficult to accomplish with the current Wikitext parsing structure.

User interface
The user interface for exporting to DocBook would be similar to the "Printable version" link found currently on MediaWiki links. "Save as XML" or "Save as Docbook" would be a separate link that would export the current article to DocBook XML.