![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 41
Karma: 1000
Join Date: Dec 2010
Location: Virginia Beach, VA, USA
Device: iPhone, NOOK Color, iPad Pro, Kindle Fire HD
|
Leading digits in file names okay?
Embarrassing question, but I need confirmation.
I have a lovely EPUB that works great on an iPad, a NOOK Color, an iPhone, and in the Kindle Previewer. It passes the ePubChecker preflight with no warnings or errors. However, it yields “bad value for attribute "id"” and “bad value for attribute “idref” in 66 lines of the content.opf file. It also yields “bad value for attribute "id"” for 33 of the book's HTML files. These files are named sequentially, 01.html, 02.html, etc. They're the individual chapter files. The other files in the book have functional names—copyright, preface, etc. I have a bad feeling that the digits in the file names are causing the problem—is this correct? Or would it be an intervening path? Here are samples of the ERROR syntax (path names omitted): ERROR: . . . /OEBPS/content.opf(56): bad value for attribute "id" ERROR: . . . /OEBPS/content.opf(103): bad value for attribute "idref" ERROR: . . . /OEBPS/Text/01.html(12): bad value for attribute "id" Your advice is greatly appreciated! |
![]() |
![]() |
![]() |
#2 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,544
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Filenames starting with digits are no problem, but ids cannot start with digits. So, if you (or something else) create the id value from the filename, you have to add something else:
This is wrong: Code:
<item id="01" href="01.html" media-type="application/xhtml+xml" />
Code:
<item id="file_01" href="01.html" media-type="application/xhtml+xml" />
Last edited by Jellby; 09-25-2011 at 09:28 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 41
Karma: 1000
Join Date: Dec 2010
Location: Virginia Beach, VA, USA
Device: iPhone, NOOK Color, iPad Pro, Kindle Fire HD
|
Thanks, Jellby. What I did was to batch-add the prefix “ch” to the numbered file names (now ch01.html, for example) using Applescript, which is similar to your solution, albeit not as easy! Then I did a search-and-replace in Text Wrangler for the old names in the EPUB files, replaced them with the new ones, and ran the EPUB back through the ePubChecker. The EPUB passed the check and preflight with no warnings or errors.
I like your solution better, so if/when I encounter this situation again, I will definitely follow this. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
file names column | Vince197 | Library Management | 9 | 05-07-2011 03:25 AM |
Calibre File Names | ll Legion ll | Calibre | 4 | 10-13-2010 05:03 PM |
Kindle File Names | Captain Skurvy | Amazon Kindle | 2 | 08-14-2010 02:22 AM |
File names in other language | doremifaso | PocketBook | 9 | 06-18-2010 12:09 PM |
File Names | Vulcan | Sony Reader | 4 | 01-02-2009 04:03 PM |