{i} Current State : WIP

DOM to DocBook Conversion

Equivalences

Check DOM DocBook and HTML 2010/DOM-DocBook Equivalences

About this converter

We output DocBook v.5 because it is the last one, and support namespace correctly. So it will allow us to add more features (like a support for MathMl for instance).

We test the output or our converter against the Relax-NG grammar from DocBook http://www.docbook.org/xml/5.0/rng/docbook.rng (we do this only in the unit test naturally).

We handle low lever conversion at this time (so just the DOM Tree, no any conversion using the context, or the metadata).

Status

{i} Current State : WIP (Early stage)

Page Structure

Basic text Structure

Lists

/!\ NB : Text for <listitem> should be within a tag (like para or another list or whatever ...) but not alone.

Tables

DocBook support HTML tables natively. So we can use similar equivalences and source code from HTML_OUT converter.

Paragraph Elements

Span element

Here is the list of direct conversion :

And here a dictionary for other possibilities:

abbr
abbrev

Objects

Objects in Docbook are wrapped in <inlinemediaobject> or <mediaobject> depending if we use inline of floating display. Since the DOM Tree does not support yet floating image, we are going to use <inlinemediaobject> at first.

After, the object data is itself wrapped in specific tag depending of its kind : <audioobject>, <imageobject>, <textobject>, <videoobject>. We should have an helper function to determine correct the kind of each object. (Already one is working for image).

Then, each object has his specific tag to handle the data. See the example below for more information :

The code : <object xlink:href="myPics.png" type="image/" /> will be converted in :

<inlinemediaobject>
  <imageobject>
    <imagedata fileref='myPics.png' />
  </imageobject>
</inlinemediaobject>

Unsupported tag

Here is the list of the unsupported tags. We just emit a log message when we encounter one of these.

ToDo

MoinMoin: DOM DocBook and HTML 2010/DOM-DocBook (last edited 2010-08-07 15:40:21 by ValentinJaniaut)