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 08-04-2010, 03:13 AM   #1
rlarrett
Graphic Artist
rlarrett began at the beginning.
 
rlarrett's Avatar
 
Posts: 2
Karma: 10
Join Date: Jun 2010
Location: San Francisco
Device: Kindle
ePub Validation Problem

I have built an ePub file, using Dreamweaver, Calibre, Sigil. It works fine in iBook (locally) and Adobe Digital Editions, looks great, and (of course) will not validate. I get this error message, over and over:

Code:
(name of book).epub/OEBPS/Text/jas_split_000.xhtml(64): 'OEBPS/Text/title_page': referenced resource missing in the package
The line of code highlighted is always an a href + id tag, which typically looks like this:
Code:
<h1 class="chead" id="calibre_pb_2"><a class="calibre1" href="contents" id="contents"></a>Contents</h1>
I took out the Calibre "a class" stuff, thinking that might be confusing matters, but it didn't help. I am at a total loss what to do. There are a lot of internal links in this book, for the index.

Any ideas would be greatly appreciated
rlarrett is offline   Reply With Quote
Old 08-04-2010, 06:39 AM   #2
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
<a class="calibre1" href="contents" id="contents"></a>

Your href is malformed. What is this referring to? A file? An id within a file? In fact it looks as if this anchor is trying to link back to itself. All hrefs should specify the complete location: <filename>#<fragment id>.
charleski is offline   Reply With Quote
 
Enthusiast
Old 08-04-2010, 08:48 AM   #3
rlarrett
Graphic Artist
rlarrett began at the beginning.
 
rlarrett's Avatar
 
Posts: 2
Karma: 10
Join Date: Jun 2010
Location: San Francisco
Device: Kindle
First off, thank you for your reply, charleski! All of the hrefs in question refer to named anchors in the body of the text, to which either the TOC, index, or footnote links point. In the example I offered, "Contents" is the anchor to which the link in the TOC page refers. And since the h1 tag is sufficient to place it in the TOC, and nothing links to it directly, that probably is dumb. The ID is identical to the href because I had no reason to make them different. Because, evidently, I have no idea what I am doing.

Most of the offending links are meant to be named anchors to "pages" in the book:
Quote:
<a class="calibre1" href="p16" id="p16"></a>
This is meant to be a named anchor for page 16, to which the index can link. Which it does! But not in a good way, I guess. Any advice on what a non-malformed href might be like would be very appreciated! Hope this makes sense.
rlarrett is offline   Reply With Quote
Old 08-04-2010, 09:20 AM   #4
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
You only need to include an href if you want the anchor to link back to something (ToC, index, etc). The id is the name of that particular anchor, the href is a pointer allowing the anchor to link to somewhere else.

E.g.:
Text.html:
<a id="XYZ_Text" href="Index.html#XYZ_Index">XYZ</a>

Index.html:
XYZ: <a id="XYZ_Index" href="Text.html#XYZ_Text">p16</a>

Click on 'XYZ' in the index and it'll take you to the page in the text where it's located. Click on 'XYZ' in the text and it'll take you back to the index entry for it.

If you don't need the link-back (which sounds like it's the case here), then you can drop the href (and the class, which is irrelevant since the anchor doesn't contain any text). So simply change them to <a id="p16" />.
Your html will then look like:

Text.html:
blah blah blah <a id="XYZ1" />XYZ blah
...
blah blah blah <a id="XYZ2" />XYZ blah

Index.html:
XYZ: <a href="Text.html#XYZ1">p16</a>, <a href="Text.html#XYZ2">p24</a>

Last edited by charleski; 08-04-2010 at 09:30 AM. Reason: Made the example clearer
charleski is offline   Reply With Quote
Old 08-04-2010, 10:12 AM   #5
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: 6,166
Karma: 4792399
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by rlarrett View Post
Any advice on what a non-malformed href might be like would be very appreciated! Hope this makes sense.
First, you don't need an <a> element in order to provide a valid target for links, you can add the "id" attribute to any element and, if you want the anchor somewhere in mid-text, you could use <span id="p16"></span>, for instance, though charleski's suggestion of <a id="p16" /> is probably the best solution.

Second, the real problem is that your "href="p16"" actually links to a file name "p16", which does not exist; what you really mean is "href="#p16"", i.e., a link to the target named "p16" in the current file.
Jellby is offline   Reply With Quote
Old 08-04-2010, 07:30 PM   #6
keriah
Junior Member
keriah began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2010
Device: iPad
Quote:
Originally Posted by charleski View Post
...
Index.html:
XYZ: <a id="XYZ_Index" href="Text.html#XYZ_Text">p16</a>
...
Interesting... When I convert the Index of our print book I will, of course, have physical page numbers (like your "p16" example) in the source. But there aren't physical (stable) page numbers to point to in an iBook.

Sure, I can create the link, but what text should appear in the Index, rather than something like the "16"? IOW, what is are the recommended conventions for laying out the Index section of an ePub? And are there editors/tools that help with this?
keriah is offline   Reply With Quote
Old 08-04-2010, 09:16 PM   #7
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,702
Karma: 5643657
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by keriah View Post
Interesting... When I convert the Index of our print book I will, of course, have physical page numbers (like your "p16" example) in the source. But there aren't physical (stable) page numbers to point to in an iBook.

Sure, I can create the link, but what text should appear in the Index, rather than something like the "16"? IOW, what is are the recommended conventions for laying out the Index section of an ePub? And are there editors/tools that help with this?
Sigil will build the nested TOC from Headings tags. It also provides a tool(TOC editor) that allows you to ignore certain header tags in the TOC context.

<h3>Chapter 42</h3>
No visible referent in the text? <h3 title="The big format fight scene"> </h3>

Sigil will make the linkage for you.
theducks is online now   Reply With Quote
Old 08-04-2010, 09:43 PM   #8
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Quote:
Originally Posted by theducks View Post
Sigil will build the nested TOC from Headings tags. It also provides a tool(TOC editor) that allows you to ignore certain header tags in the TOC context.

<h3>Chapter 42</h3>
No visible referent in the text? <h3 title="The big format fight scene"> </h3>

Sigil will make the linkage for you.
That would be great if he was talking about the TOC...
He is talking about the index and if there is an auto feature somewhere which takes the nightmare of hyperlink index and puts in one nice little button to click on.
Adjust is offline   Reply With Quote
Old 08-05-2010, 05:35 AM   #9
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by keriah View Post
Interesting... When I convert the Index of our print book I will, of course, have physical page numbers (like your "p16" example) in the source. But there aren't physical (stable) page numbers to point to in an iBook.

Sure, I can create the link, but what text should appear in the Index, rather than something like the "16"? IOW, what is are the recommended conventions for laying out the Index section of an ePub? And are there editors/tools that help with this?
There aren't any conventions on what to do in the absence of page numbers, so frankly you can can make up whatever you want here. You could simply use letters or symbols, but a logical way of handling it would be by chapter and paragraph, e.g. c5¶12, c6¶4, etc. The advantage of this is that it would retain a sense of how large the entry is: if you see multiple entries listed as c4¶2, c6¶15-62, c7¶25, you'll realise that the second entry is the largest one and most likely to contain the information you're seeking.
charleski is offline   Reply With Quote
Old 08-05-2010, 08:48 AM   #10
keriah
Junior Member
keriah began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2010
Device: iPad
Thanks for the quick responses. And, yes, I am not worried about the TOC -- I have that part working, using a combination of Dreamweaver and eCub, plus some text edit tools to tweak and rezip the resulting .epub file.

After I posted this question I found a discussion by Liz Castro in her blog (http://tinyurl.com/2537fxa). It's an interesting approach ... and a lot of work! She discusses the rationale for retaining the print page number values in her epub index entries and provides a link to (draft) material on the pagelist function.

BTW, her new book (on ePub) has come out, and it is available in ePub format as well as paper. It has already answered another of my 'burning questions' from the book's preview pages: how to do a "keep together" so that a header doesn't appear alone, on the bottom of a page. Yeah. (That was going to be my next post here.)

Keri
keriah is offline   Reply With Quote
Old 08-05-2010, 10:54 AM   #11
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
The real problem with Liz's approach is that the index links to the start of a 'page' rather than to the text where the entry appears. Since it's quite possible for a printed page to contain more text than a reader can display on a single screen (especially if you're reading the ebook on a small device like a cell phone), that means there's no guarantee that the index entry will take you to a screen which mentions the subject at all. This could cause obvious confusion and frustration if the user doesn't realise they might have to page forward one or two times to find the relevant text.

She's attempting to leverage the existing tools that InDesign provides, and that makes a lot of sense, but it's not really the best approach to the problem.
charleski is offline   Reply With Quote
Old 09-17-2010, 04:24 PM   #12
AbbyEscapades
Junior Member
AbbyEscapades began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2010
Device: none
Hi, I have a similar error. I'm uploading our first epub file to itunes producer and come up with the following:

ERROR: CutthroatBusiness_ASavannahMartin.epub/OEBPS/Text/index_split_001.html(10): 'stylesheet.css': referenced resource missing in the package
ERROR: CutthroatBusiness_ASavannahMartin.epub/OEBPS/Text/index_split_003.html(10): 'stylesheet.css': referenced resource missing in the package
ERROR: CutthroatBusiness_ASavannahMartin.epub/OEBPS/Text/index_split_004.html(10): 'stylesheet.css': referenced resource missing in the package
ERROR: CutthroatBusiness_ASavannahMartin.epub/OEBPS/Text/index_split_005.html(10): 'stylesheet.css': referenced resource missing in the package
ERROR: CutthroatBusiness_ASavannahMartin.epub/OEBPS/Text/index_split_006.html(10): 'stylesheet.css': referenced resource missing in the package
ERROR: CutthroatBusiness_ASavannahMartin.epub/OEBPS/Text/index_split_007_split_000.html(10): 'stylesheet.css': referenced resource missing in the package
ERROR: CutthroatBusiness_ASavannahMartin.epub/OEBPS/Text/index_split_007_split_001_split_000.html(10): 'stylesheet.css': referenced resource missing in the package
ERROR: CutthroatBusiness_ASavannahMartin.epub/OEBPS/Text/index_split_007_split_001_split_001.html(10): 'stylesheet.css': referenced resource missing in the package
Check finished with warnings or errors!

When I look at the code for the stylesheet page in Sigil it looks fine but then again I don't know code. Feel free to talk to me like a kindiegardner.

Thanks,
AbbyEscapades is offline   Reply With Quote
Old 09-17-2010, 07:39 PM   #13
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Ok...We need to see your stylesheet.css and the index_split_001.html for starters.
as it's probably the same error for the rest of them
Adjust is offline   Reply With Quote
Old 09-18-2010, 04:17 AM   #14
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: 6,166
Karma: 4792399
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Could be just a problem of relative paths. If you have:

OEBPS/Text/index_split_001.html
OEBPS/Styles/stylesheet.css

then, in index_split_001.html you have to refer to "../Styles/stylesheet.css", and not just "stylesheet.css".
Jellby is offline   Reply With Quote
Old 10-07-2010, 01:06 AM   #15
sudarsanam
sudarsanam
sudarsanam began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2008
Device: ebook
reply

i am also learn



Quote:
Originally Posted by rlarrett View Post
I have built an ePub file, using Dreamweaver, Calibre, Sigil. It works fine in iBook (locally) and Adobe Digital Editions, looks great, and (of course) will not validate. I get this error message, over and over:

Code:
(name of book).epub/OEBPS/Text/jas_split_000.xhtml(64): 'OEBPS/Text/title_page': referenced resource missing in the package
The line of code highlighted is always an a href + id tag, which typically looks like this:
Code:
<h1 class="chead" id="calibre_pb_2"><a class="calibre1" href="contents" id="contents"></a>Contents</h1>
I took out the Calibre "a class" stuff, thinking that might be confusing matters, but it didn't help. I am at a total loss what to do. There are a lot of internal links in this book, for the index.

Any ideas would be greatly appreciated

Last edited by sudarsanam; 10-07-2010 at 01:09 AM.
sudarsanam is offline   Reply With Quote
Reply

Tags
epub files, validation, validation epub links

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub validation problems robcub ePub 12 02-04-2011 05:04 AM
ePub validation error sk19.gupta Introduce Yourself 6 10-19-2010 10:53 PM
ePub Validation Error mrbillb ePub 6 09-28-2010 02:14 PM
Epub validation problem silentobserver ePub 3 08-16-2010 12:51 AM
Epub Validation Problems crestfalleen Calibre 6 08-02-2010 09:43 PM


All times are GMT -4. The time now is 08:35 PM.


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