19 | | starts now! |
| 19 | === Problem === |
| 20 | |
| 21 | In order to have a complete conversion tool, it's necessary to be able to convert existing documentation, written in HTML, to quickbook. As this currently stand, good progress is being made on the following part of the document conversion pipeline: |
| 22 | |
| 23 | {{{ |
| 24 | docbook --[boostbook + xsltproc]--> HTML --[quickbook css]-->quickbook |
| 25 | }}} |
| 26 | |
| 27 | However, this project still lacks an important part: |
| 28 | |
| 29 | {{{ |
| 30 | HTML --[html to docbook (missing)]--> docbook --> [above pipeline] --> result |
| 31 | }}} |
| 32 | |
| 33 | The aim of this subproject then, is to investigate some open source solutions to this problem, and try and see which one will work best for boost. |
| 34 | |
| 35 | === Converting HTML to docbook XML === |
| 36 | |
| 37 | What exactly should this tool do? As input it should take an HTML document (which may not necessarily be valid XHTML) and map the HTML tags to docbook XML. For example: |
| 38 | |
| 39 | {{{ |
| 40 | <h1>My Section</h1> |
| 41 | <p>Some text</p> |
| 42 | }}} |
| 43 | |
| 44 | should become something like: |
| 45 | |
| 46 | {{{ |
| 47 | <section id="my_section"> |
| 48 | <title>My Section</title> |
| 49 | <para>Some text</p> |
| 50 | </section> |
| 51 | }}} |
| 52 | |
| 53 | Two main problems present themselves. In the first case, what should the tool do if the original document doesn't validate as XHTML? Secondly, there will certainly be a many-to-one mapping from HTML to docbook. Is it possible to determine a general solution for this? |