Originally Posted by splinters
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:
<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:creator opf:role="aut">[Author name]</dc:creator>
[This is the best book ever written, please buy it so I can afford to feed my dog, blah blah]</dc:description>
<dc:identifier id="BookID" opf:scheme="UUID">[long arbitrary string of letters and numbers]</dc:identifier>
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.