MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   EPUBCheck error (https://www.mobileread.com/forums/showthread.php?t=338212)

gsosigil 03-21-2021 06:49 PM

EPUBCheck error
 
There are actually a whole series of errors, the first though I think is the cause of the rest:
Code:

ERROR        OEBPS/content.opf - Error while parsing file: element "package" not allowed here; expected element "ns1:package" or "ns2:package" (with xmlns:ns1="http://openebook.org/namespaces/oeb-package/1.0/" xmlns:ns2="http://www.idpf.org/2007/opf")
The line in 'content.opf the error refers to:
Code:

<package version="2.0" unique-identifier="unique-identifier" xmlns="http://www/idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
Google (and Bing) returned one search result for this error, which I think is technically called a googlewhack, https://www.zhihu.com/question/39893155

KevinH 03-21-2021 07:04 PM

Notice the difference between what they want and what you have:

They want namespace: http://www.idpf.org/2007/opf

but your package tag has a typo.

It defines a namespace: http://www/idpf.org/2007/opf

So just fix the typo in your opf package tag to change:

www/idpf.org

to

www.idpf.org

KevinH 03-21-2021 07:08 PM

Also what version of Sigil are you using? That typo was found and fixed in the code that tries to auto fix the opf when it was missing the proper namespaces a while back.

gsosigil 03-21-2021 07:24 PM

Thank you, that has sorted it out. I'm using Sigil 1.5.0, however the epub file was created using an older version of Sigil (not sure which).


All times are GMT -4. The time now is 09:25 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.