View Single Post
Old 01-11-2016, 06:36 PM   #1
DonPayne
Junior Member
DonPayne began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2016
Device: ADE
Thumbs down Sigil changes epub, even with "Clean Source" unchecked; ADE crashes

(I'm new to Sigil today.)

Sigil makes spurious changes to my epub file. These changes cause ADE to crash and make comparison of epub files practically impossible using "diff" or similar text tools. Process:

I open Sigil version 0.9.2 on Windows 8.1.
I go to menu > Edit > Preferences; under "Clean Source" > "Mend XHTML Source Code On", I uncheck both boxes "Open" and "Save"; click OK to confirm.
I open an epub file (generated by Adobe InDesign CC (Creative Cloud) version 2014.2 on Mac OS X), do nothing to it, and save it.
I try to open this epub file in ADE (Adobe Digital Edition) version 4.5 on Windows 8.1; it "stops responding", then crashes. The original file opens in ADE with a delay (it's 30+ MB) but no errors.
I unzip both original and Sigil-saved epub files, then diff them.

Some differences:

- under directory OEBPS, original directory "font" is renamed by Sigil to "Fonts", "image" to "Images" and "css" to "Styles". All XHTML files, which in original are directly in the OEBPS directory, Sigil has moved to a subdirectory "Text". The XHTML files are adjusted to point to fonts, images and CSS files in the new directories. As you can imagine, this introduces many, many differences merely in the directory references in "href" and "src" attributes in the XHTML files.

- In META-INF/container.xml and OEBPS/content.opf, and OEBPS/toc.ncx, "standalone" attribute was removed:
< <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
---
> <?xml version="1.0" encoding="UTF-8"?>

- In the XHTML, the original doc has a space before the close of an "empty" XHTML element. Sigil's version removes that space. Example from container.xml:
Original:
<link href="css/idGeneratedStyles.css" rel="stylesheet" type="text/css" />
Sigil:
<link href="../Styles/idGeneratedStyles.css" rel="stylesheet" type="text/css"/>

- In encryption.xml, fonts appear in a different order from the original. Example:
original:
<encryption xmlns="urnasis:names:tcpendocument:xmlns:conta iner" xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
<enc:EncryptedData>
<enc:EncryptionMethod Algorithm="http://www.idpf.org/2008/embedding" />
<enc:CipherData>
<enc:CipherReference URI="OEBPS/font/Calibri.ttf" />
...
Sigil:
<?xml version="1.0" encoding="UTF-8"?>
<encryption xmlns="urnasis:names:tcpendocument:xmlns:conta iner" xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
<enc:EncryptedData>
<enc:EncryptionMethod Algorithm="http://www.idpf.org/2008/embedding"/>
<enc:CipherData>
<enc:CipherReference URI="OEBPS/Fonts/SFCartoonistHand-BoldItalic.ttf"/>
...

- in OEBPS/content.opf, order of attributes was changed:
< <package version="3.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/">
---
> <package prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/" unique-identifier="bookid" version="3.0" xmlns="http://www.idpf.org/2007/opf">

< <meta name="generator" content="Adobe InDesign 10.2" />
---
> <meta content="Adobe InDesign 10.2" name="generator"/>

< <item id="cover" href="cover.xhtml" media-type="application/xhtml+xml" />
[... long list of items ...]
---
> <item href="Text/cover.xhtml" id="cover" media-type="application/xhtml+xml"/>

- in OEBPS/toc.ncx, nested XHTML that was packed into one line in original was expanded to multiple lines by Sigil. Example:
< <navPoint id="navpoint1" playOrder="1"><navLabel><text>DEDICATION</text></navLabel><content src="Pickle_Don_sandbox.
xhtml#_idParaDest-1" /></navPoint>
[... many other navPoint elements ...]
---
> <navPoint id="navpoint1" playOrder="1">
> <navLabel>
> <text>DEDICATION</text>
> </navLabel>
> <content src="Text/Pickle_Don_sandbox.xhtml#_idParaDest-1"/>
> </navPoint>

- Even though most of the XHTML files are in the same directory "Text", Sigil links from one to another by an unnecessary path up one directory then back down into Text:
original:
< <p class="TOC_Chapter"><a href="Pickle_Don_sandbox.xhtml#_idTextAnchor000">D EDICATION</a></p>
Sigil:
> <p class="TOC_Chapter"><a href="../Text/Pickle_Don_sandbox.xhtml#_idTextAnchor000">DEDICAT ION</a></p>

- Sigil changes empty "td" elements into an open and close tag:
< <td class="No-Table-Style" />
---
> <td class="No-Table-Style"></td>

All these changes appear innocuous, but something must be making ADE crash. And with all the spurious changes, I cannot see what the real problem is.
DonPayne is offline   Reply With Quote