Closed GoogleCodeExporter closed 9 years ago
Original comment by john@nachtimwald.com
on 29 Jan 2012 at 12:10
I don't think this is a duplicate of 1019, or at least the current source build
post 0.5.0 still has an issue with this file.
The problem is that the file contains lines with opf: defined and the error is
that opf namespace is used but not declared.
I don't know what software produced this file, or why the opf namespace isn't
declared (or even what that is), or why the lines have opf: in them, but one
possible hack fix at the end of ImportOEBPS::PrepareOPFForReading is
// MASSIVE hack for allowing parsing of files with opf: namespace used but not declared
source_copy.replace( QRegExp( "<([/])*opf:") , "<\\1" );
Now, whether this is appropriate or what implications it has is hard to say
(e.g. what if the opf namespace is declared? should it be adding a declaration
instead of removing the entries?), but given the other hacks rewriting the
contents file something like this doesn't seem out of line.
For the submitter, the way to work around this is to unzip the file. Change
the permissions of all the files to be readable (for some reason they are all
set to unreadable). Edit the contents.opf file and remove opf: wherever you
see <opf: or </opf: Then zip up the file again to a new test.epub file.
Original comment by meme90...@gmail.com
on 29 Jan 2012 at 11:03
Changing to lack info as no EPUB demonstrating the issue was attached. Attach a
sample file so the issue can be confirmed.
Original comment by john@nachtimwald.com
on 29 Jan 2012 at 2:08
I've removed the opf namespace rewriting because #1212 also had an issue with
it. Most likely this issue is the same issue but without a sample file I cannot
be sure.
Original comment by john@nachtimwald.com
on 29 Jan 2012 at 2:19
My comments above were actually meant for 1212 - not sure how they ended up on
this one...
Original comment by meme90...@gmail.com
on 29 Jan 2012 at 6:32
Looking at the version number supplied for this ticket it is a duplicate of
1019.
Original comment by john@nachtimwald.com
on 29 Jan 2012 at 7:23
Original issue reported on code.google.com by
rremel...@gmail.com
on 28 Jan 2012 at 11:27Attachments: