View Full Version : Please explain ePub Validation Error


kawane
08-08-2011, 09:59 PM
I uploaded a Word doc (created on Office for Mac) to Smashwords which converted it to an ePub. The validation generated 15 instances of this type of error:

ERROR: how-i-protect-my-stocks-with-a-put-option-hedge.epub/tmp_f3d6af0ca9a1a73b2415f33ec868d3e6_kcJC_I.ch.fix ed.fc.tidied.stylehacked.xfixed_split_003.html(349 ): attribute "start" not allowed here; expected attribute "class", "dir", "id", "style", "title" or "xml:lang"

Additionally, there were three of these:
ERROR: how-i-protect-my-stocks-with-a-put-option-hedge.epub: The file tmp_f3d6af0ca9a1a73b2415f33ec868d3e6_kcJC_I_html_3 d72238e.png does not appear to be of type image/png

Please help me interpret these errors and how to fix these.

Thanks in advance for your help.

st_albert
08-08-2011, 10:27 PM
Unfortunately, AFAIK there is no easy way to trace smashwords induced epub errors back to the source Word document.

Search ths forum for "smashwords" or "meatgrinder" and "validation error" and you should find many threads dealing with your issue. Maybe something in one of them can help you work around the problem (which, evidently, is a meatgrinder bug, not your fault).

Jellby
08-09-2011, 04:50 AM
ERROR: how-i-protect-my-stocks-with-a-put-option-hedge.epub/tmp_f3d6af0ca9a1a73b2415f33ec868d3e6_kcJC_I.ch.fix ed.fc.tidied.stylehacked.xfixed_split_003.html(349 ): attribute "start" not allowed here; expected attribute "class", "dir", "id", "style", "title" or "xml:lang"

The "start" attribute is used in HTML for ordered lists (<ol>), to specify the number they start from. But it is not a correct attribute in XHTML, and it is suggested to use CSS counters (http://stackoverflow.com/questions/487528/ordered-lists-ol-starting-index-with-xhtml-strict) instead. But CSS counters are not supported in ePUB, so actually there is no way with the current ePUB specification to start a list with an index other than 1.

Fix: Open your ePUB and remove every instance of start="..." you find in the text files.

ERROR: how-i-protect-my-stocks-with-a-put-option-hedge.epub: The file tmp_f3d6af0ca9a1a73b2415f33ec868d3e6_kcJC_I_html_3 d72238e.png does not appear to be of type image/png

Apparently, some image files' formats don't match their filenames. Those are images that are stored as JPEG or GIF or whatever, but have a name that ends in ".png" instead. This, in itself, is not a problem, there's no need for a filename to match the format, it just makes things easier for humans (and badly coded programs).

Fix save the affected .png files as PNG format with an appropriate program (Photoshop, Gimp, IrfanView...), and hope Word/Smashwords is not messing everything up.

Toxaris
08-09-2011, 06:33 AM
Jellby, the issue is that Smashwords only accept Word documents and not ePUB. It is easy enough to fix in an ePUB, but no way to get it to Smashwords. Their 'program' to convert Word to ePUB is rather messy. It generates a lot of errors and Smashwords is saying 'not our problem, solve it yourself'.

You could check whether you use ordered lists which starts at a different number and alter that in Word. Also, try to use jpg instead of png. Try an export of your word document to filtered html and see if you can open the images. Perhaps it is a jpg, but thinks it is a png.

kawane
08-09-2011, 01:44 PM
To all who have replied...thank you very much for your insight and recommendation. I agree that my perception of Smashwords is "not my problem." I think the easiest solution regarding the numbered list is to remove numbered lists all together and be done with it. Thank you again for your help!

Toxaris
08-09-2011, 03:25 PM
Actually, I said that the attitude of Smashword is 'it is not our problem'. Of course you have the problem, but are probably unable to fix it due to their attitude.