![]() |
#1 |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
OPF Errors
@ kovid
1) According to Open Packaging Format (OPF) 2.0.1 v1.0.1 spec, "The spine element must include the toc attribute, whose value is the id attribute value of the required NCX document declared in manifest." In other words, there has to be a <spine toc="ncx">, not just <spine>. I have a book with just a <spine> element (opening tag), and after Check Book there is no warning of this error. Could this be included in Calibre checks? 2) Another book with .opf file starting with: <?xml version="1.0"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"[]> Sigil reports "Invalid OPF file", but no error after Check Book. Is it an error or not? If yes, could the DOCTYPE start be reported as one, and users offered a replacement with <?xml version='1.0' encoding='utf-8'?>? Thanx ![]() |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1) My philosophy with Check Book is not to blindly report deviations from the spec, but only report errors that are know to actually cause problems with reading programs. Not including that attibute on spine causes no actual problems, that I know of. For blind spec checking, plenty of tools already exist.
2) Unfortunately, because of the way XML parsing works in check book, detecting DOCTYPE errors is not possible. See how DOCTYPES are automatically removed by calibre (click the beautify button in the opf file). I could of course write a specialized parsing routine to detect DOCTYPE errors, but this is too much work, at east for me. |
![]() |
![]() |
![]() |
#3 |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I have no idea, I never use blind spec checking tools myself. I find them to be pretty useless. They will tell your about three thousand "errors" that cause no actual problems and miss the one error that will, because it is not part of the "spec".
|
![]() |
![]() |
![]() |
#5 | |
Village idiot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
|
Quote:
|
|
![]() |
![]() |
![]() |
#6 | |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change opf filename from content.opf to title.opf | northstar7 | Sigil | 3 | 09-23-2013 12:44 PM |
Certain OPF errors not catched by Validate | Toxaris | Sigil | 0 | 03-31-2013 03:50 AM |
TWO OPF files or something like Media Queries in the OPF file for KF8 and MOBI? | DHahn | Kindle Formats | 3 | 04-17-2012 04:06 AM |
validation - 59 errors OPF file | LostSock | ePub | 15 | 06-29-2011 02:26 PM |
.OPF errors | lhumble | ePub | 4 | 06-25-2011 01:09 AM |