View Single Post
Old 06-30-2010, 07:32 AM   #3
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by splinters View Post
1.ERROR: Harolds House.epub/META-INF/encryption.xml(1): unfinished element
2.ERROR: Harolds House.epub/OEBPS/content.opf(2): date value '' is not valid, YYYY[-MM[-DD]] expected

How can I correct this so it will pass? Is there any way I can correct these errors in Adobe InDesign CS4 before saving as an epub file?
Unfortunately you can't fix these in InDesign itself, though they're quite easy to fix outside it.

1) Download tweak_epub from here.
2) Run tweak_epub and open your epub file.
3) From the list of files, select 'encryption.xml' and click 'Edit File...'. Delete all the contents of that file and save it.*
4) Find the file ending with a '.opf' extension in the list (there will only be one). Select it and click 'Edit File...'. The first part will look something like this:
Code:
<?xml version="1.0"?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookID" version="2.0">
    <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
        <dc:title>[Title]</dc:title>
        <dc:identifier opf:scheme="ISBN">[ISBN]</dc:identifier>
        <dc:subject>[Genre]</dc:subject>
        <dc:creator opf:role="aut">[Author name]</dc:creator>
        <dc:description>SUMMARY:
[This is the best book ever written, please buy it so I can afford to feed my dog, blah blah]</dc:description>
        <dc:publisher>[You]</dc:publisher>
        <dc:language>en</dc:language>
        <dc:identifier id="BookID" opf:scheme="UUID">[long arbitrary string of letters and numbers]</dc:identifier>
        <dc:date>2009-07-14</dc:date>
    </metadata>
The section in red is the bit you need to add or edit, since InDesign doesn't generate it. Simply type in the publication date in YYYY-MM-DD format along with the surrounding tags as shown. Then save the file.
5) Click the 'Save Changes' button.

The book should now pass with iTunes.

*If you have tools to manipulate zip files (like 7zip or winrar) then you can just delete encryption.xml, since it's not needed.
charleski is offline   Reply With Quote