Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-23-2011, 09:19 PM   #1
sgirsberger
Enthusiast
sgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheese
 
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!
sgirsberger is offline   Reply With Quote
Old 09-24-2011, 03:06 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
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" />
This is right:
Code:
<item id="file_01" href="01.html" media-type="application/xhtml+xml" />
Note that the filename in href does not change.

Last edited by Jellby; 09-25-2011 at 09:28 AM.
Jellby is offline   Reply With Quote
Advert
Old 09-25-2011, 09:19 AM   #3
sgirsberger
Enthusiast
sgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheesesgirsberger can extract oil from cheese
 
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.
sgirsberger is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 03:24 PM.


MobileRead.com is a privately owned, operated and funded community.