View Full Version : Epub validation errors


Newauthor
07-22-2011, 08:56 AM
Hi everyone, I'm new here and I'm having some trouble. I created my ebook in open office, made the epub with the epub extension. Looks great in ADE however when I run a validation I come back with a long list of errors. I've downloaded Sigil to look at each file verbatim but I'm a little lost on what to do. Could any one provide assistance.

I see that its telling me text but what exactly am I looking for? Thanks in advance!

/OEBPS/Text/content0002.xhtml(49): 'Chapter4': fragment identifier is not defined in 'OEBPS/Text/content0002.xhtml'

/OEBPS/Text/content0002.xhtml(43): 'Chapter1': fragment identifier is not defined in 'OEBPS/Text/content0002.xhtml'

DaleDe
07-22-2011, 10:53 AM
Can you show us line 49 and line 43?

Toxaris
07-22-2011, 03:22 PM
Or better, the lines between 40 and 55.

Newauthor
07-23-2011, 01:24 AM
Hi yes, thank you for the response. Here's what I have


39 <p> </p>

<p>Table of Contents</p>

<p><a href="#Chapter1"><span class="underline">Disclaimer</span></a>.</p>

<p><a href="#Chapter2"><span class="underline">Foreword</span></a></p>

<p><a href="#Chapter3"><span class="underline">The Journey of an L7</span></a></p>

<p><a href="#Chapter4"><span class="underline">I got caught Slippin’</span></a></p>

52 <p><a href="#Chapter5"><span class="underline">A Lesson Learned</span></a></p>

charleski
07-23-2011, 04:13 AM
39 <p>*</p>

<p>Table of Contents</p>

<p><a href="#Chapter1"><span class="underline">Disclaimer</span></a>.</p>



There needs to be a file name before the '#', i.e. something like
href="OEBPS/Text/content0003.xhtml#Chapter1"

Newauthor
07-23-2011, 09:11 PM
There needs to be a file name before the '#', i.e. something like
href="OEBPS/Text/content0003.xhtml#Chapter1"

Thanks for the response!

Do I need to include this for every href occurrence in content0002.xhtml and reference it accordingly to the other content00XX.xhtml files??

JSWolf
07-23-2011, 09:14 PM
If you have a good toc.ncx (external ToC), then you don't actually need the file with the links (internal ToC).

Newauthor
07-23-2011, 09:14 PM
Playing around in Sigil I added the link after the href I validated again to see which errors I would get. It's a much shorter list but here's what the new errors are.

ERROR: a-how-to-guide-for-meeting-women-on-craigslist.epub/toc.ncx(56): assertion failed: different playOrder values for navPoint/navTarget/pageTarget that refer to same target

ERROR: a-how-to-guide-for-meeting-women-on-craigslist.epub/toc.ncx(74): assertion failed: different playOrder values for navPoint/navTarget/pageTarget that refer to same target

ERROR: a-how-to-guide-for-meeting-women-on-craigslist.epub/toc.ncx(66): 'Chapter9': fragment identifier is not defined in 'tmp_da02e54b013a717f705d92d610839337_GpOkmN.ch.fi xed.fc.tidied.stylehacked.xfixed_split_001.html'

ERROR: a-how-to-guide-for-meeting-women-on-craigslist.epub/toc.ncx(72): 'Chapter10': fragment identifier is not defined in 'tmp_da02e54b013a717f705d92d610839337_GpOkmN.ch.fi xed.fc.tidied.stylehacked.xfixed_split_001.html'

charleski
07-24-2011, 05:50 AM
Let Sigil generate the ncx ToC automatically. You need to be very precise if you're editing it by hand.

Newauthor
07-24-2011, 06:22 AM
Sorry I'm new with this software. How do I do that?

charleski
07-24-2011, 06:44 AM
If you're using the 0.4.0RC1 release of Sigil then you need to click the button at the bottom of the Table of Contents window, it should happen automatically in older versions.

DaleDe
07-24-2011, 11:31 AM
If you're using the 0.4.0RC1 release of Sigil then you need to click the button at the bottom of the Table of Contents window, it should happen automatically in older versions.

Assuming you used h1, h2, h3, etc. tags for those things you want in the TOC.

Dale

Newauthor
07-24-2011, 04:22 PM
I seem to be lost guys. I tried the toc button at the bottom of the table of contents tab. Resaved, then ran another epub validation to see what errors I got this time. I received the same ones and I'm lost. Please help!

Here's what threepress said:
epub/toc.ncx(74): assertion failed: different playOrder values for navPoint/navTarget/pageTarget that refer to same target


So I went into Sigil, looked at the toc.ncx file and copied the section in question.


69 <navPoint id="navPoint-10" playOrder="10">
<navLabel>
<text>The 5 things to avoid!</text>
</navLabel>
<content src="Text/content0011.xhtml" />
74 </navPoint>


Next I went to the content0011.xhtml to see if something was wrong in the coding there. I couldn't find anything other than this:

<h1 class="center" id="heading_id_10"><span class="bold">The 5 things to avoid!</span></h1>


Other than other help that I've read, is it possible the span tags could be creating the issue? Should I remove them or change them to 'strong'?:help:

DaleDe
07-24-2011, 07:32 PM
I seem to be lost guys. I tried the toc button at the bottom of the table of contents tab. Resaved, then ran another epub validation to see what errors I got this time. I received the same ones and I'm lost. Please help!

Here's what threepress said:
epub/toc.ncx(74): assertion failed: different playOrder values for navPoint/navTarget/pageTarget that refer to same target


So I went into Sigil, looked at the toc.ncx file and copied the section in question.


69 <navPoint id="navPoint-10" playOrder="10">
<navLabel>
<text>The 5 things to avoid!</text>
</navLabel>
<content src="Text/content0011.xhtml" />
74 </navPoint>


Next I went to the content0011.xhtml to see if something was wrong in the coding there. I couldn't find anything other than this:

<h1 class="center" id="heading_id_10"><span class="bold">The 5 things to avoid!</span></h1>


Other than other help that I've read, is it possible the span tags could be creating the issue? Should I remove them or change them to 'strong'?:help:

I doubt the span tag is causing the problem, although it is unnecessary as H1 is always bold automatically.

What the error is saying is that there are two references in the TOC that point to the same place. It is likely that you have a case problem. Sigil is case sensitive. I suspect you have two references with different capitalization that point to the same place.

Dale

Newauthor
07-24-2011, 09:40 PM
Thanks Dalede, I'll take a look and see what I come up with.:thanks:

JSWolf
07-24-2011, 10:39 PM
Actually, H1 is not automatically bold. It depends on the settings for H1 in CSS.

DaleDe
07-25-2011, 12:34 AM
Actually, H1 is not automatically bold. It depends on the settings for H1 in CSS.

Yes, it is automatic unless, as you say, overridden by the CSS. The default is bold, no need to specify.

Dale

JSWolf
07-25-2011, 08:11 PM
Yes, it is automatic unless, as you say, overridden by the CSS. The default is bold, no need to specify.

Dale

Yes you are correct about h1 being bold.

Newauthor
07-25-2011, 09:31 PM
Hello everyone. After reading back through messages. This is really turning out to be a fun project. How do I go about deleting the internal TOC, to let Sigil create the TOC?

DaleDe
07-26-2011, 01:10 AM
Hello everyone. After reading back through messages. This is really turning out to be a fun project. How do I go about deleting the internal TOC, to let Sigil create the TOC?

You don't have to delete the internal TOC but if you want to you just erase it in the xhtml document that it appears in.

To create and external TOC which is totally independent from the internal one if present, you need only use h1, h2, h3, etc. heading for the titles you want to appear in the TOC and click the TOC menu choice in tools to see what you have done. If the h number is the same then the entries will be on the same level. larger h numbers will appear and lower level toc entries. You can also remove any that show up but you don't want them to be in the TOC. I often use a h1 for the Title but I don't want it in the TOC.

Dale

Newauthor
07-26-2011, 02:13 AM
Dale,

The table of contents info shows up in content0002.xhtml. Would it be recommended that I erase all the information there? Then hit the ToC generation button in Sigil?

Newauthor
07-26-2011, 02:36 AM
Okay so after much playing around. I ran another epub validation and I'm ending up with the same errors. Shown below.


ERROR: epub/toc.ncx(56): assertion failed: different playOrder values for navPoint/navTarget/pageTarget that refer to same target

ERROR: epub/toc.ncx(74): assertion failed: different playOrder values for navPoint/navTarget/pageTarget that refer to same target

ERROR: epub/toc.ncx(66): 'Chapter9': fragment identifier is not defined in 'tmp_da02e54b013a717f705d92d610839337_GpOkmN.ch.fi xed.fc.tidied.stylehacked.xfixed_split_001.html'

ERROR: epub/toc.ncx(72): 'Chapter10': fragment identifier is not defined in 'tmp_da02e54b013a717f705d92d610839337_GpOkmN.ch.fi xed.fc.tidied.stylehacked.xfixed_split_001.html'

So I looked at the toc.ncx line 56 all it says is </navPoint> but nothing after that.

Line 51 <navPoint id="navPoint-7" playOrder="7">

Line 55 <content src="Text/content0008.xhtml" />

Looking at Content0008.xhtml
Line 13 <h1 class="center" id="heading_id_7"><span class="bold">xxxxx</span></h1>

Looking at Content.Opf
Line 39 <item href="Text/content0008.xhtml" id="content0008.xhtml" media-type="application/xhtml+xml" />


Thanks every one for all the help but I'm having a head to desk moment trying to figure this one out. My conclusion is if I can correct toc.ncx line 56, then I should be able to correct 74.

As for epub/toc.ncx(66): 'Chapter9': fragment identifier is not defined in 'tmp_da02e54b013a717f705d92d610839337_GpOkmN.ch.fi xed.fc.tidied.stylehacked.xfixed_split_001.html'

Anything you can provide to shoot me in the right direction would be greatly appreciated. Thanks a million!

Newauthor
07-26-2011, 02:43 AM
Found something here. At the top of my xhtml files I'm noticing there's two different <?xml lines. Does this matter at all?

<?xml version="1.0"?>

<?xml version="1.0" encoding="utf-8" standalone="no"?>

Newauthor
07-26-2011, 03:41 AM
Thank you everyone. I'm pleased to announce that I the epub validation has passed!

DaleDe
07-26-2011, 10:36 AM
Dale,

The table of contents info shows up in content0002.xhtml. Would it be recommended that I erase all the information there? Then hit the ToC generation button in Sigil?

As I said, it does not matter! They are independent, not in any way related to each other. They don't even have to have the same data. The links in the xhtml file are just links. You know they are a toc but the program does not.

Dale

Newauthor
07-27-2011, 11:46 PM
As I said, it does not matter! They are independent, not in any way related to each other. They don't even have to have the same data. The links in the xhtml file are just links. You know they are a toc but the program does not.

Dale

Thanks Dale, I took it right out and then it passed! I uploaded to lulu and it excepted but then it was rejected by one of their QA specialist because of a little semi colon. So I removed the semi colon, saved, ran another epub validation just to make sure it was clear and received this error.

/OEBPS/Text/content0001.xhtml(13): element "body" incomplete; expected element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg")

Now if I put the semi colon back it passes no problem. What is this all about if you can help me to understand. Thanks!:help:

DaleDe
07-28-2011, 12:03 PM
Thanks Dale, I took it right out and then it passed! I uploaded to lulu and it excepted but then it was rejected by one of their QA specialist because of a little semi colon. So I removed the semi colon, saved, ran another epub validation just to make sure it was clear and received this error.

/OEBPS/Text/content0001.xhtml(13): element "body" incomplete; expected element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg")

Now if I put the semi colon back it passes no problem. What is this all about if you can help me to understand. Thanks!:help:

Well, taking it out may have let it pass but only if there were errors in the TOC code. This is nothing wrong with an inline TOC. As a matter of fact this is going to be the rule for ePub version 3. The toc.ncx file will be history.

Again it would be helpful to see the line containing the simicolon to see what is going on, but I suspect the tech support guy was wrong.

Dale

Newauthor
07-29-2011, 06:37 AM
Well, taking it out may have let it pass but only if there were errors in the TOC code. This is nothing wrong with an inline TOC. As a matter of fact this is going to be the rule for ePub version 3. The toc.ncx file will be history.

Again it would be helpful to see the line containing the simicolon to see what is going on, but I suspect the tech support guy was wrong.

Dale

Hi Dale,

Its on the content0001.xhtml. Here is what it says on lines 9 - 15.

<title></title>
</head>

<body>
<p>;</p>
</body>
</html>

Line 13 is the problem. Is there something else that's suppose to be there?

charleski
07-29-2011, 07:26 AM
Do you really want a completely blank page? It's always a good idea actually to look at the ePub in something like ADE and make sure it appears the way you want it. Blank pages are common in print as fillers for the printing signatures, but aren't needed (or desirable) in ebooks.

What do you actually want to go on the first page of your book?

DaleDe
07-29-2011, 11:14 AM
Hi Dale,

Its on the content0001.xhtml. Here is what it says on lines 9 - 15.

<title></title>
</head>

<body>
<p>;</p>
</body>
</html>

Line 13 is the problem. Is there something else that's suppose to be there?

There should be something there. If you remove the ; then there is nothing in the whole document, no text, no images, nothing. That is why there is an error. Why would you want an entire page with a ; in the upper left hand corner? Why would you want a blank page. If you really want a blank page consider: <p>This page is intentionally blank</p>

It is likely that this page is an artifact of the fact that Sigil gives you a starting page to begin your book on. In this case you should just remove the whole page. Right click on the entry in the left column of Sigil and delete the file.
Dale

JSWolf
07-29-2011, 11:33 AM
Well, taking it out may have let it pass but only if there were errors in the TOC code. This is nothing wrong with an inline TOC. As a matter of fact this is going to be the rule for ePub version 3. The toc.ncx file will be history.

Are you serious that ePub 3 is going to remove the external ToC in favor of an internal ToC? If so, that's going backwards, not forwards.

Jellby
07-29-2011, 12:16 PM
Are you serious that ePub 3 is going to remove the external ToC in favor of an internal ToC? If so, that's going backwards, not forwards.

As far as I know, all that's going to happen is that the NCX format will be dropped and a different format for the external TOC will be used.

JSWolf
07-29-2011, 12:24 PM
As far as I know, all that's going to happen is that the NCX format will be dropped and a different format for the external TOC will be used.

But will there be backwards compatibility for the NCX style ToC?

The biggest issue ePub 3 is going to have is readers still using an older version of ePub. So unless publishers want ePub eBooks failing to work on a very large number of readers, they won't be able to use any of the ePub 3 features.

DaleDe
07-29-2011, 12:41 PM
As far as I know, all that's going to happen is that the NCX format will be dropped and a different format for the external TOC will be used.

the different format is documented in our wiki under ePub 3. It will be simple <ol> and <li> statements with a <nav> wrapper. It could be internal or external depending on how the reader treats it or it would easily be both. I suspect <ul> tags will be usable instead of <ol> if you don't want the numbers to show up on the screen. There will be an option for books needing to be read in older software to have an ncx file in addition but it would not be used by any reader supported ePub 3. the wiki page is work in process.

Newauthor
07-29-2011, 03:47 PM
There should be something there. If you remove the ; then there is nothing in the whole document, no text, no images, nothing. That is why there is an error. Why would you want an entire page with a ; in the upper left hand corner? Why would you want a blank page. If you really want a blank page consider: <p>This page is intentionally blank</p>

It is likely that this page is an artifact of the fact that Sigil gives you a starting page to begin your book on. In this case you should just remove the whole page. Right click on the entry in the left column of Sigil and delete the file.
Dale

Done and done! Works like a charm. I'll look into this epub 3 wiki as I'm still learning this format. Thanks for all your help!:thanks:

charleski
07-29-2011, 05:08 PM
Are you serious that ePub 3 is going to remove the external ToC in favor of an internal ToC? If so, that's going backwards, not forwards.

It'll allow books to have different types of ToC, i.e. one for the chapters, one for a list of illustrations, one for a list of tables, etc. (you could probably also use it to provide an index). It'll provide a lot more flexibility that'll be useful for non-fiction especially.

The old NCX can be maintained as well for older systems, though all the new html5 and mathml tags mean that compatibility is going to be a wider issue. In theory the switch elements defined for ePub 2 will allow backwards-compatibility, but it remains to be seen whether generating tools will support this properly and whether publishers will take the time to format the text in different ways for different systems.

JSWolf
07-29-2011, 10:13 PM
Do you think ADE can force companies for update their version of ADE on readers that are no longer being made? I doubt it. So I see ePub 3 as tanking because too many devices won't be using ePub 3. Of course, the publishers could sell and ePub 2 and an ePub 3 version.

st_albert
08-01-2011, 12:14 PM
Do you think ADE can force companies for update their version of ADE on readers that are no longer being made? I doubt it. So I see ePub 3 as tanking because too many devices won't be using ePub 3. Of course, the publishers could sell and ePub 2 and an ePub 3 version.

(emphasis mine)

If our sales figures are any guide, the majority of reading devices today use the mobipocket format. Just sayin'.

Not that that's a GOOD thing, of course.

DaleDe
08-01-2011, 12:22 PM
Do you think ADE can force companies for update their version of ADE on readers that are no longer being made? I doubt it. So I see ePub 3 as tanking because too many devices won't be using ePub 3. Of course, the publishers could sell and ePub 2 and an ePub 3 version.

It looks like there is consideration for using ePub 3 books on ePub 2 devices, and the reverse of reading old book with new devices. The standard doesn't address the second path but I would expect the device manufactures to do so. The whole idea of HTML is to ignore things you don't understand. That has been the philosophy from the beginning and it should serve ePuB well. The standard provides for the older toc.ncx continuing support and the ability to work without script support and most other things will fall into the ignore category.

Dale