EPUB export + a bugfix

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@56 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2010-03-31 07:25:24 +00:00
parent ce61f7bc3b
commit 7644cf2eba
14 changed files with 122 additions and 81 deletions

View file

@ -41,16 +41,14 @@ import org.w3c.dom.Element;
import writer2latex.api.ContentEntry;
import writer2latex.api.ConverterResult;
import writer2latex.api.OutputFile;
import writer2latex.util.Misc;
import writer2latex.xmerge.NewDOMDocument;
/** This class writes an OPF-file for an EPUB document (see http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html)
*
/** This class writes an OPF-file for an EPUB document (see http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html).
*/
public class OPFWriter extends NewDOMDocument {
public OPFWriter(ConverterResult cr, String sUUID, String sNcxFileName, String sFileName) {
super(Misc.removeExtension(sFileName), "opf");
public OPFWriter(ConverterResult cr, String sUUID) {
super("book", "opf");
// create DOM
Document contentDOM = null;
@ -123,7 +121,7 @@ public class OPFWriter extends NewDOMDocument {
}
Element item = contentDOM.createElement("item");
item.setAttribute("href", sNcxFileName);
item.setAttribute("href", "book.ncx");
item.setAttribute("media-type", "application/x-dtbncx+xml");
item.setAttribute("id", "ncx");
manifest.appendChild(item);