Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-23-2011, 10: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: 36
Karma: 1000
Join Date: Dec 2010
Location: Virginia Beach, VA, USA
Device: iPhone, NOOK Color, iPad
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
Advert
Old 09-24-2011, 04: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,009
Karma: 8796505
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 10:28 AM.
Jellby is offline   Reply With Quote
Old 09-25-2011, 10: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: 36
Karma: 1000
Join Date: Dec 2010
Location: Virginia Beach, VA, USA
Device: iPhone, NOOK Color, iPad
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
file names column Vince197 Library Management 9 05-07-2011 04:25 AM
Calibre File Names ll Legion ll Calibre 4 10-13-2010 06:03 PM
Kindle File Names Captain Skurvy Amazon Kindle 2 08-14-2010 03:22 AM
File names in other language doremifaso PocketBook 9 06-18-2010 01:09 PM
File Names Vulcan Sony Reader 4 01-02-2009 05:03 PM


All times are GMT -4. The time now is 12:20 AM.


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