View Full Version : epub errors Help!


jaexterr
12-03-2011, 09:43 AM
I have been working on my epub in sigil (file created in indesign) and have cleaned up all errors except the toc.ncx file, "unsupported protocol in URL" line 1- Can anyone help me resolve this?

This same error comes up both in Sigil epub check and the online epubchecker (I did both just in case.)

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE ncx PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">

Ive been looking at it until im cross eyed and need to get this doc up asap.
Thanks!

DiapDealer
12-03-2011, 12:41 PM
It that's the first line of your toc.ncx file, it's all wrong. It looks like you've just taken the header from an XHTML file and just changed the 'html' (immediately following the !DOCTYPE) to 'ncx'.

An NCX header should look like this:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd"><ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
<head>

Jim Lester
12-03-2011, 12:42 PM
ncx not html for your head element and your doctype declaration seems off.

<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">

Serpentine
12-03-2011, 12:52 PM
<!DOCTYPE ncx PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">

Not sure why there's an html namespace in your ncx either, should likely remove that.

Edit: and beaten by everyone :)

jaexterr
12-03-2011, 01:07 PM
so... I tried all the options suggested, the first two gave me more errors in the file, the last one was "unsupported protocol in URL ".

I freely admit I dont know what Im doing, there could be all number of things Ive missed in getting this file right. I have attached the file for review... I sure appreciate your help. :blink:

DiapDealer
12-03-2011, 02:18 PM
I can't guarantee there's no typos, but I tried to whip your file into shape. ;)

Make sure you rename it to toc.ncx

jaexterr
12-03-2011, 05:18 PM
Thanks DiapDealer!! It looks lovely and tidy...but Im STILL getting an error

Its says "expected end of tag "navpoint" at line 500... and when I check line 500 the tag </navpoint> is there (as expected!) why would it not recognize it?

DiapDealer
12-03-2011, 05:38 PM
Its says "expected end of tag "navpoint" at line 500... and when I check line 500 the tag </navpoint> is there (as expected!) why would it not recognize it?
I'm not sure. Especially since the file I uploaded has less than 260 lines. :blink:

jaexterr
12-03-2011, 06:31 PM
LOL I guess Sigil adds lines (and maybe spaces...?) to the code. Grrr.
Any suggestions......please this is my last hope LOL

jaexterr
12-04-2011, 09:06 AM
I changed all the <content src="Text/cover.html"/> to </content src="Text/cover.html"> and the error changed to "expected end of tag "navPoint". However the correct tag seems to be there on the next line, line 19. Does anyone know why it wouldnt read it correctly? Everything else seems to read great! (the bracket below is not in the code, just showing line 18 in text) Thanks!

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
<head>
<meta name="dtb:uid" content="123456789X"/> <!-- same as in .opf -->
<meta name="dtb:depth" content="1"/> <!-- 1 or higher -->
<meta name="dtb:totalPageCount" content="0"/> <!-- must be 0 -->
<meta name="dtb:maxPageNumber" content="0"/> <!-- must be 0 -->
</head>
<docTitle>
<text>The Chronicles of Trayvian James, Book 1: Dreamworld</text>
</docTitle>
<navMap>
<navPoint id="navPoint-1" playOrder="1">
<navLabel>
<text>Cover</text>
</navLabel>
(18) </content src="Text/cover.html">
</navPoint>
<navPoint id="navPoint-2" playOrder="2">
<navLabel>
<text>preface1</text>
</navLabel>
</content src="Text/preface1.html">
</navPoint>

DiapDealer
12-04-2011, 09:19 AM
I changed all the <content src="Text/cover.html"/> to </content src="Text/cover.html">
You need to change all those back.

jaexterr
12-04-2011, 01:39 PM
ok will do - thanks for the tip! Any ideas on why its still not going through?

Jim Lester
12-04-2011, 05:53 PM
In XML all start and end tags must be matched:
So there must be an end tag </foo> for every start tag <foo>, and vice versa.
Note that 'empty tags' <foo /> count as both start on stop tags (they match themselves)

So by changing all the <content ... /> to </content ... >
You changed them from empty tags to end tags which made your XML invalid since the tags were unbalanced (end tags with no start tags) - which the parser complained about in it's cryptic fashion.

--
p.s If Sigil is causing you problems:
1.) Hand edit the .ncx file and manually up the epub as a zip container.
2.) Report the bug.

jaexterr
12-04-2011, 09:07 PM
you mean its not me.....? LOL
Finally, it works , and Im not even sure I did anything!!
Thanks :)