View Full Version : ePub Validation Error


sn12
03-07-2012, 11:47 AM
Hi there everyone,

I am confused by an error that has come up in ePubCheck.
I prepared my epub in InDesign and converted it in Calibre. I then ran the converted file through the IDPF epub validator online. It returned two errors, which were similar to one another.

1. ERROR. content.opf. Line 22, position 114. Value of attribute 'id' is invalid; must be an XML name without colons.

and

2. ERROR. content.opf. Line 64, position 60. Value of attribute 'idref' is invalid; must be an XML name without colons.

If anyone has any thoughts on why these occurred and how I can alter my epub to fix these errors, I would be very grateful. I have worked on epubs in the past and never encountered this error.

Thank you!

Toxaris
03-07-2012, 01:48 PM
It sounds rather straightforward actually. There are some problems with your opf. What are lines 22 and 64?
This must be identifiers which can be used as a reference towards to files in the ePUB. In the spine there is usually a 'idref' with the same name. I don't know what ID uses for id names, but Sigil uses the filenames (which makes sense). I assume there are non valid characters in your id. Any spaces or other non-letter/digit characters?

Also, run the ePUB through FlightCrew. You might get other errors or at least better descriptions.

amyg
03-07-2012, 06:34 PM
ID uses the file name also without file extension of course. I've never had a problem with the id or idref not validating. Maybe Calibre is messing things up. Since ID does epub conversion, I'm not sure what you need Calibre for. Why not output straight to epub from InDesign?

Toxaris
03-08-2012, 02:51 AM
Well, the ePUB export of ID is not perfect and has flaws. As far as I know, the most people do the final touching up in Sigil.

Anyway, I think there are strange characters in the filename then.

sn12
03-08-2012, 06:51 AM
Thank you all for your helpful advice. This will be very useful in future in helping me understand problems I encounter. I ran the epub through calibre once more before making changes, and it validated this time. Not sure where the mysterious errors went! Thank you again for all the help.

amyg
03-08-2012, 10:45 AM
Toxarix, with CS 5.5 it's actually pretty good, though not perfect. The html code is clean. I use export tagging and my own CSS style sheet so I have more control over the style naming. I need to put the guide section into the opf file and I use my own cover and title html pages that I create by hand so I pop those in. I tried Sigil but I didn't like it. It made unnecessary changes just opening and closing the epub. I have more control tweaking the files in a text editor or Dreamweaver.

But what I don't understand is how you would use Calibre in conjunction with InDesign. As far as I know, you can't tweak the epub in Calibre.

Toxaris
03-08-2012, 11:50 AM
Thank you all for your helpful advice. This will be very useful in future in helping me understand problems I encounter. I ran the epub through calibre once more before making changes, and it validated this time. Not sure where the mysterious errors went! Thank you again for all the help.

Please, don't do ePUB to ePUB conversion in Calibre. You can break things and it really produces messy code.

Toxaris
03-08-2012, 11:54 AM
Toxarix, with CS 5.5 it's actually pretty good, though not perfect. The html code is clean. I use export tagging and my own CSS style sheet so I have more control over the style naming. I need to put the guide section into the opf file and I use my own cover and title html pages that I create by hand so I pop those in. I tried Sigil but I didn't like it. It made unnecessary changes just opening and closing the epub. I have more control tweaking the files in a text editor or Dreamweaver.

But what I don't understand is how you would use Calibre in conjunction with InDesign. As far as I know, you can't tweak the epub in Calibre.

Version 5.5 is reasonable, but not good enough. A lot of things still produces problems.

Sigil does not make any unnecessary changes. It might rearrange the files in folders, but that does make it more consistent and is according to the ePUB specification. It also is more consistent in using styles, but that can be switched off. It will ensure structurally valid ePUB's. Also, the validation is unsurpassed. It is better than ePubCheck.
I very much doubt you have more control in Dreamweaver or a text editor, especially with the PCRE S&R. However, to each its own.

amyg
03-08-2012, 12:44 PM
Text Wrangler and Dreamweaver both have regular expression search and replace. But as you said, to each his own. We all have our preferred workflows. I very rarely post about mine because of this. I just couldn't understand the need for Calibre in conjunction with InDesign. That was really the crux of my post.