"package" in OPF problem?
Looking at an ePub2 that works fine, but ePubCheck complains:
ERROR(RSC-005): Error while parsing file 'element "package" not allowed here; expected element "opf:package" or "package" (with xmlns="http://openebook.org/namespaces/oeb-package/1.0/")'.
Then another error for every line in the OPF like:
ERROR(RSC-005): Error while parsing file 'element "dc:creator" not allowed here; expected the element end-tag or text'.
I have no clue what this means.
The OPF begins:
<?xml version="1.0" encoding="utf-8"?>
<package version="2.0" unique-identifier="ISBN" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
<metadata>
Is this where the problem is? Can anyone suggest how to fix this?
=========================================
PS. I replaced with the below, copied from another epub, only keeping the original "unique-identifier="ISBN"
This now works, epubcheck has no errors.
<?xml version="1.0" encoding="utf-8"?>
<package version="2.0" unique-identifier="ISBN" xmlns="http://www.idpf.org/2007/opf">
<metadata xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/">
I notice this has most of the "xmlns" links moved to the metadata tag.
Any simple guide to what this is all about?
Last edited by AlanHK; 06-07-2021 at 12:52 AM.
|