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

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 08-08-2014, 10:20 AM   #1
DagB
Junior Member
DagB began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2014
Device: iPad, iPhone, Sony 650, GalaxyTab 2014, Sony Z1 Compact
Epub3-problems

Have created an epub3 (fixed layout) in Indesign CC2014, and it validates fine with EpubCheck.
Then I open it in Calibre to do som editing/fixing, and finds that when I save it, Calibre adds info in the content.opf-file that is not accepted by EpubChecker, or by the company that I use to publoiish books ti iTunes Store.
Is this a bug, - or are there ways to avoid this ...?
The error-report looks like this (there are several lines with this type of error):
... OEBPS/content.opf(4,119): attribute "ns0:role" not allowed here; expected attribute "dir", "id" or "xml:lang"
DagB is offline   Reply With Quote
Old 08-08-2014, 12:25 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,989
Karma: 40810464
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If you're not using any of calibre's automated "Beautify", "Fix html", or "Reorganize" features (and you've ensured that the ebook's metadata is not being updated before opening it in the editor), or you're not renaming files, then it (calibre) really shouldn't be changing anything you don't manually change yourself--certainly not in the opf file. It doesn't in my experience anyway. If you ARE doing/using any of those things with your epub3 book ... don't. It's not an epub3 "aware" editor (though it should handle html5 stuff OK).

Last edited by DiapDealer; 08-08-2014 at 12:39 PM.
DiapDealer is offline   Reply With Quote
Old 08-08-2014, 12:26 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,905
Karma: 5035037
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Turn off the automatic metadata updating under calibre integration in the editor preferences.
kovidgoyal is online now   Reply With Quote
Old 08-15-2014, 03:58 AM   #4
DagB
Junior Member
DagB began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2014
Device: iPad, iPhone, Sony 650, GalaxyTab 2014, Sony Z1 Compact
OK, - so I can not use Calibre to update/edit metadata without getting a file that is not epub3 compliant ... ?
DagB is offline   Reply With Quote
Old 08-15-2014, 07:21 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,838
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by DagB View Post
OK, - so I can not use Calibre to update/edit metadata without getting a file that is not epub3 compliant ... ?
I may be wrong, but I don't believe that just because something is "not accepted by EpubChecker" means it is not epub3 compliant.
DoctorOhh is offline   Reply With Quote
Old 08-15-2014, 08:08 AM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,989
Karma: 40810464
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DoctorOhh View Post
I may be wrong, but I don't believe that just because something is "not accepted by EpubChecker" means it is not epub3 compliant.
True.
But I believe calibre's editor only "understands" ePub 2 when it comes to automatically updating/altering things in the opf file (metadata/file names/folder structure). So allowing calibre to automatically rebuild the opf to reflect those automatic changes will probably result in the opf being parsed/rebuilt as ePub2 (at least the package version declaration; which could make some meta entries invalid).

If the OP wants to use calibre's editor to update the metadata of a valid ePub3, they'd have to turn off the automatic metadata updating (like Kovid mentioned), and change the metadata manually in the OPF file. With "automatic metadata updating" turned off, manual changes to the markup and opf/ncx files should not result in the opf file being rebuilt.

I've manually edited valid ePub3s with calibre's editor and had them remain valid after saving. So it can be done. You just have to be careful and not let the editor do anything FOR you (except maintain the container, of course ).

Last edited by DiapDealer; 08-15-2014 at 08:10 AM.
DiapDealer is offline   Reply With Quote
Old 08-15-2014, 09:06 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,905
Karma: 5035037
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The editor just keeps the parsed OPF as an lxml tree and re-serializes it, so no automatic changes should happen to the package version and so on. That said, the editor, like the rest of calibre has no support for epub 3, so if you plan to work on epub 3, it is best to be careful and turn off automatic metadata update.

The OP's error message actually does not indicate an invalid epub 3, it just indicates that either whatever was used to check the OPF does not understand how XML namespaces work or there is an extra attribute on some tag. Neither condition means that the epub 3 file will not actually work.

As is usual with epub validity checking, finding an "invalid" epub file is more likely to indicate that the tool you are using to check the epubs is pathetic rather than that the epub will actually not work anywhere.
kovidgoyal is online now   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
ePub3-3D odedta ePub 4 08-13-2014 09:02 AM
Epub3 XHTML Validation epub3 Ramesh Arpitha ePub 5 06-30-2014 08:32 PM
New Errors Converting epub3 -> zip -> epub3 Lola25 ePub 2 11-12-2013 09:37 PM
epub3 me too ePub 67 08-17-2012 01:48 AM
epub3 pbs_ebook Writer2ePub 1 05-06-2011 11:47 AM


All times are GMT -4. The time now is 12:04 AM.


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