View Full Version : Itunes Producer weird error message

06-21-2011, 07:41 AM
I'm trying to submit my first ebook to the Appstore through Itunes Producer, I created it with Calibre and then corrected a few errors manually with Sigil.

What's weird is I get the following error message with Itunes Producer , although my Epub is validated by Flightcheck and EpubChecker :

ERROR ITMS-9000: "wonderland_split_001.html(331): element "p" from namespace "" not allowed in this context" at Book (MZItmspBookPackage)

Any idea where this might come from ? I have no line 331 in the epub, too, it stops at line 161... I'm despairing :-P

06-21-2011, 10:36 PM
You have to look at the file wonderland_split_001.html. Did you look at that file?

06-23-2011, 12:24 PM
Hey JSWolf,
Yes, I did look at wonderland_split_001.html after unzipping the Epub, it is my only file as it is a short story. And I have no idea what I should look at for this error (I have only 161 lines there, the error message seems to refer to line 331...) :-(

06-23-2011, 09:35 PM
I can think of two possibilities:
1 - You may have very long lines which get split into multiple lines by iTunes Producer. This might happen if your originating software makes each paragraph a single line, as most word processors do. I hate this because I use simple minded text editors like vim or gedit which don't wrap lines, forcing me to scroll sideways when I fix up html code. Html parsers don't generally care about white space, so they can use smaller read buffers than word processors.
2 - Have you tried using an xml verifier on the xhtml file? It should use the xml schema specified in the file and point you to the problem. It sounds sort of like a prematurely terminated body, to me. Sorry I can't think of a verifier for you to use.

06-24-2011, 08:41 AM
Thanks for your suggestions, pholy.
You are right about the long lines, that must be why I get this (331) error.
I edited out 2 sections of "<p>" that seemed a bit weird , and it did the trick, my epub was delivered to Ibookstore ! :)

I think what was causing a problem may have been either
<p class="calibre10 sgc-1">&nbsp;</p>
right before the </body> tag
<p><span class="calibre7"><br class="calibre8" id="calibre_pb_7" /></span></p>
which was at the beginning.


06-24-2011, 02:07 PM
I have heard that iBooks does not understand the &nbsp; syntax. It is a serious limitation, if true.

06-24-2011, 07:20 PM
iBooks does a lot of weird and not wonderful things.

06-24-2011, 08:08 PM
<p><span class="calibre7"><br class="calibre8" id="calibre_pb_7" /></span></p>
which was at the beginning.

If that part was at the beginning of the file or outside the <body>...</body> it would certainly cause problems... and I'm not sure a <p> without text (although I think the &nbsp; is text) is is correct xhtml...