In this case it is really easy. OEBPS Open eBook framework. Best the currently developed 2.0 version. It defines an .epub format which is a Zip containing HTML with supporting files in XML. Mobipocket already uses it as source format. LIT does the same (using the older format).
If fact most of the ebook formats are simply repackaged XHTML.
|