View Single Post
Old 07-25-2017, 03:36 AM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
OPF missing opf metadata tag

I have epubs from various sources and clean them up and convert to azw to load on my Kindle.

I also set some metadata, but in a few files found these were not working correctly. Every time I saved it in Sigil it would change them: e.g.:

<dc:identifier opf:scheme="AMAZON">
became
<dc:identifier scheme="AMAZON">

and did not work properly (was ignored by kindlegen).

Also a swarm of errors turned up in epubcheck.

Eventually I found that the culprit was a metadata tag.
These files had:

<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">

The well-behaved epubs had :

<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">


So I assume the latter part was needed to define the tags properly.

Adding that fixed the problem; metadata now works.

I don't know the cause of the omission; but perhaps this will be useful to others.

Last edited by AlanHK; 07-25-2017 at 10:54 AM.
AlanHK is offline   Reply With Quote