Reply to: XMetaL Author 8 export to epubFebruary 12, 2014 at 11:23 pm
The [url=http://sourceforge.net/projects/dita-ot/]DITA Open Toolkit[/url] included with XMetaL Author Enteprise includes an integrated a plug-in in the 7 and 8 releases from a project called “[url=http://dita4publishers.sourceforge.net/]dita4publishers[/url]” and that plug-in generates an EPUB, which is basically a ZIP file (with .epub file extension) containing HTML files and any images the HTML references. In order to use this solution you must be authoring DITA documents. It is exposed as the deliverable named “EPUB (experimental)” in XMetaL Author Enterprise 8.
If your XML uses another standard schema (DTD or XSD), or at least one that is popular, then there may be specific solutions already created for transforming your content into an EPUB. Google should help you find those. If not (or your schema is proprietary, ie: unique to your organization) then you might use a process like this:
1. Configure XMetaL Author Essential or Enterprise to generate HTML output from your XML. At minimum all that is needed to do this is to call the method saveAsHTML() from within a macro you expose in your XMetaL customization (the authoring solution you have created for editing your XML files in XMetaL Author). This is documented in the Programmers Guide in the section named “Formatting Object”.
2. Generate HTML using #1.
3. [optional] Modify the auto-generated XSLT files produced by #2 (and if you do that then generate the HTML again so you get the new form of HTML you want).
4. [optional] Create some CSS that will style your HTML nicely.
5. Get an EPUB generation tool to generate an EPUB based on your HTML. Google will show you that A: some people mean different things when they say EPUB* and B: there are many tools to generate them. Almost all EPUB tools support HTML in some fashion because EPUB uses HTML (XHTML) as its base file format for content. These tools often do not do much more than repackage the HTML files into a ZIP file (the EPUB container) though they may also generate files like table of contents, add publishing metadata, etc.
After you've done all of these things (configuration) then in future all you need to do is the following:
1. Generate HTML.
2. Use your EPUB tool together with that HTML to produce an EPUB (according to the way that tool does it).
* EPUB is sometimes confused with the term e-book. If that is the case here then please see this: http://en.wikipedia.org/wiki/Comparison_of_e-book_formats, otherwise a good description with a list of available tools for generating EPUB is located here: http://en.wikipedia.org/wiki/EPUB