Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-08-2010, 04:40 AM   #1
robcub
Member
robcub began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2010
Device: ADE
ePub validation problems

Hi,

This is an ePub that I'd created in InDesign CS4.

I'm trying to upload it to http://bookworm.oreilly.com/ but I'm getting validation issues:

1. The complete error message is: Could not find file OEBPS/Note%20from%20the%20Editor.xhtml in archive even though it was listed in the OPF file

The file is there!

2. epubcheck agrees that this is not a valid ePub file, so you should check with the publisher or content creator. It returned 1 error(s): temp.epub/META-INF/encryption.xml(1): attribute "compression" from namespace "http://ns.adobe.com/digitaleditions/enc" not allowed at this point; ignored

This is my encryption.xml:

<encryption xmlns="urnasis:names:tcpendocument:xmlns:conta iner" xmlns:enc="http://www.w3.org/2001/04/xmlenc#" xmlns:deenc="http://ns.adobe.com/digitaleditions/enc"><enc:EncryptedData deenc:compression="none"><enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/><enc:CipherData><enc:CipherReference URI="OEBPS/Fonts/Times%20New%20Roman.ttf"/></enc:CipherData></enc:EncryptedData></encryption>

This is my second attempt at making an ePub. I would really appreciate some help with the code.
robcub is offline   Reply With Quote
Old 10-08-2010, 08:06 AM   #2
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
1) Does the filename include the %20s instead of spaces? It's probably easiest just to convert spaces in the filename to underscores (in both the name in the archive and the name in the manifest).

2) epubcheck doesn't support any form of encryption. When you embedded Times New Roman InDesign automatically obfuscated it and generated an encryption file. This font will only work on ADE readers, and iBooks doesn't support any form of font embedding (I see you mention sending it to Apple devices in your other post). You also probably don't have a licence to distribute Times New Roman anyway, so it's probably best not to embed it - re-export the epub from InDesign and leave the font-embedding checkbox blank.

If you need to embed a font in an epub it's simplest to use one of the free fonts from SIL, Gnu, or other foundries, which can be embedded without the need for any obfuscation.
charleski is offline   Reply With Quote
Advert
Old 10-08-2010, 02:18 PM   #3
robcub
Member
robcub began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2010
Device: ADE
charleski, thank you very much! I went all through the InDesign documents and removed the spaces, replacing them with underscores. And then it had a problem with using inverted commas in titles although it hadn't flagged that up previously! So I got rid of the inverted commas, exported without fonts embedded, and it worked!!!!!

Good to see my first ePub in an iPhone.

One thing though, internal and external links in ePubs don't seem to work in the iPhone, although they worked in ADE. Is this usually the case? (Maybe a question for another thread)
robcub is offline   Reply With Quote
Old 10-08-2010, 02:28 PM   #4
troymc
Groupie
troymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enough
 
Posts: 161
Karma: 608
Join Date: Aug 2008
Location: Plano, TX
Device: Sony PRS-505 + B&N Nook + Motion LE1700 + Motorola Xoom Wifi
I would also suggest that unless you have a very specific reason you should not embed the font. This will allow your readers to change the font using the capability of their ereaders.

Some specific reasons to embed:
  1. You need specific characters only available in that font.
  2. Stylistic reasons - Titles, quotes, etc.

Times New Roman is such a generic font that it should probably never be embedded. An exception would be if you're using some of the specific unicode ranges in it that are not available in others (eg. arabic or hebrew). TNR is a pretty comprehensive unicode font.


Troy
troymc is offline   Reply With Quote
Old 10-08-2010, 02:30 PM   #5
troymc
Groupie
troymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enough
 
Posts: 161
Karma: 608
Join Date: Aug 2008
Location: Plano, TX
Device: Sony PRS-505 + B&N Nook + Motion LE1700 + Motorola Xoom Wifi
Wooops! Too late!

Glad to hear you got it working.


Troy
troymc is offline   Reply With Quote
Advert
Old 10-08-2010, 06:25 PM   #6
robcub
Member
robcub began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2010
Device: ADE
Haha! Thanks.

I don't know why I had that embed font checkbox checked as it wasn't even embedding the fonts I was using anyway - I was using Zapf Calligraphic and DIN! So, I agree, not much point in embedding fonts in an ePub generally.
robcub is offline   Reply With Quote
Old 01-27-2011, 07:03 AM   #7
Brianigoe
Junior Member
Brianigoe began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2011
Location: Hereford, UK
Device: None
I have problems, not solutions, and I'm so dense I don't know where to post them. New to epub, I find I have dozens of validation issues, at least half "attribute 'clear' is not declared for element 'br'". Can anyone tell me what that means and how to fix it, and also where I should be posting this?
Brianigoe is offline   Reply With Quote
Old 01-27-2011, 01:17 PM   #8
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Hi Brianigoe, and welcome to MobileRead forums.

The best thing would be to create a new thread in this (the EPUB) forum. I saw your other post in the Calibre forum:

Quote:
Originally Posted by Brianigoe View Post
I'm new to conversion and am trying to convert my books into Epub. Am using Calibre to do the job, thought I was doing fine as the result seemed legible to me, ran a Validation check using the facility in Sigil, and found a host of problems. May of them read "attribute 'clear' is not declared for element 'br'", some read "hspace" instead of "Clear", one reads "value 'Picture 2' is invalid NCName" and one "The <language> element is missing.". I have absolutely no idea what any of that means. Can anyone tell me if it's fixable, or should I give up and pay someone like Lulu to do it?
- and it looks like you have a range of problems with the HTML code in your EPUB file. The answer to "how to fix them" depends on what method you're using to create the EPUB file and to create the HTML code in the first place, and how much you understand about HTML code.

The error you refer to here:

Quote:
"attribute 'clear' is not declared for element 'br'"
indicates that you've got one or more <br /> elements in your HTML code which contain the "clear" attribute, e.g.:

Code:
<br clear="all" />
However as far as I know, the "clear" attribute isn't valid for <br /> elements in XHTML Strict (it's valid for HTML 4.01, but EPUBs use XHTML 1.0 or XHTML 1.1).

Similarly, from your other post, you refer to a validation error referring to "hspace" - again, that's an HTML attribute which isn't valid in XHTML Strict.

I'm not entirely sure about the "Picture 2" reference - I'd need to see the exact error message, but I suspect it might be that you're using "Picture 2" as the value for an 'id' attribute - you can only use letters, numbers and the underscore character - no spaces.

Finally, the reference to "the <language> element is missing"... again, it's not clear without seeing the full error message exactly as it was displayed, but I suspect it might refer to the .opf file (an XML file that forms part of an EPUB book) - there should be a metadata element in that file defining the main language used in the book, and it could be that it's missing from your EPUB.

I know this doesn't help directly with the question of how to fix these errors, but hopefully it provides some useful background on what the errors mean. If you post more details about how you're creating the EPUB, and how much or little you know about (X)HTML and CSS, someone might be able to help advise on the best way to sort out these errors.
DMSmillie is offline   Reply With Quote
Old 01-27-2011, 01:19 PM   #9
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
A search or new thread would have been better, but the forum section is correct.

Your problem is quite easy. In xhtml you need closing tags. Since <br> has none, it is not valid. However, if you add ' /' to it, it will work. So, <br> will be <br />. This will be the case for all tags without closing tags, like <br>, <hr> and <img>.
Toxaris is offline   Reply With Quote
Old 01-28-2011, 02:25 AM   #10
Brianigoe
Junior Member
Brianigoe began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2011
Location: Hereford, UK
Device: None
Thank you VERY much. I'm gradually getting a better understanding of this system, and I am really grateful for your help which must take some time to give. I started using a text originally generated in WORD and saving it in varying formats and converting from them, and I'm now cutting out all pictures, quotations, complex formats and so on and saving it as the most basic possible text, and adding the cosmetic stuff using Sigil after. That seems to work. Thanks again, Brian
Brianigoe is offline   Reply With Quote
Old 01-28-2011, 07:30 AM   #11
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
If you use styles in Word, it makes your life simpler to recreate them in Sigil. Just export to filtered HTML and into Sigil.

Read the book from Liz Castro, it will help you get not only more info about epub in general, but also more about conversion via Word. It is aimed towards iBook, but the most is general usable.
Toxaris is offline   Reply With Quote
Old 02-04-2011, 04:09 AM   #12
Brianigoe
Junior Member
Brianigoe began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2011
Location: Hereford, UK
Device: None
Quote:
Originally Posted by DMSmillie View Post
Hi Brianigoe, and welcome to MobileRead forums.

The best thing would be to create a new thread in this (the EPUB) forum. I saw your other post in the Calibre forum:



- and it looks like you have a range of problems with the HTML code in your EPUB file. The answer to "how to fix them" depends on what method you're using to create the EPUB file and to create the HTML code in the first place, and how much you understand about HTML code.

The error you refer to here:



indicates that you've got one or more <br /> elements in your HTML code which contain the "clear" attribute, e.g.:

Code:
<br clear="all" />
However as far as I know, the "clear" attribute isn't valid for <br /> elements in XHTML Strict (it's valid for HTML 4.01, but EPUBs use XHTML 1.0 or XHTML 1.1).

Similarly, from your other post, you refer to a validation error referring to "hspace" - again, that's an HTML attribute which isn't valid in XHTML Strict.

I'm not entirely sure about the "Picture 2" reference - I'd need to see the exact error message, but I suspect it might be that you're using "Picture 2" as the value for an 'id' attribute - you can only use letters, numbers and the underscore character - no spaces.

Finally, the reference to "the <language> element is missing"... again, it's not clear without seeing the full error message exactly as it was displayed, but I suspect it might refer to the .opf file (an XML file that forms part of an EPUB book) - there should be a metadata element in that file defining the main language used in the book, and it could be that it's missing from your EPUB.

I know this doesn't help directly with the question of how to fix these errors, but hopefully it provides some useful background on what the errors mean. If you post more details about how you're creating the EPUB, and how much or little you know about (X)HTML and CSS, someone might be able to help advise on the best way to sort out these errors.
Thank you very much for that comprehensive response which must have taken you some time to write. Problem now solved and book published!
Brianigoe is offline   Reply With Quote
Old 02-04-2011, 05:04 AM   #13
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Excellent! You're very welcome, and thanks for reporting back, brianigoe. Congratulations on getting the book published!
DMSmillie is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub validation error sassanik Sigil 19 12-08-2010 05:46 AM
ePub validation error sk19.gupta Introduce Yourself 6 10-19-2010 10:53 PM
ePub Validation Problem rlarrett ePub 14 10-07-2010 01:06 AM
Epub validation problem silentobserver ePub 3 08-16-2010 12:51 AM
Epub Validation Problems crestfalleen Calibre 6 08-02-2010 09:43 PM


All times are GMT -4. The time now is 01:51 AM.


MobileRead.com is a privately owned, operated and funded community.