MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   ePub (https://www.mobileread.com/forums/forumdisplay.php?f=179)
-   -   Ibooks epub 3 error : exactly one 'toc' nav element must be present (https://www.mobileread.com/forums/showthread.php?t=252932)

Firebrand007 12-15-2014 02:47 PM

Ibooks epub 3 error : exactly one 'toc' nav element must be present
 
Hello,

After much hassle, I have managed to produce an epub that is fully validated by EpubCheck and only one error remains when trying to upload to Itunes Producer.

Can someone save me and point out what I need to correct in the elements below ?
I'm doing a fixed layout EPUB3 document, so it seems I need to provide a nav.xhtml in addition to the classic toc.ncx file.
Itunes Producer gives me an an error in OEBPS/nav.xhtml(6) and says :
exactly one 'toc' nav element must be present"

I have posted below the content of my nav.XHTML , content.OPF and TOC.NCX files. Thanks a million in advance for helping !!

NAV.XHTML

<?xml version='1.0' encoding='UTF-8'?>
<html xmlns:epub="http://www.idpf.org/2007/ops" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Table of Contents</title>
</head>
<body>
<nav epub:type="landmarks" hidden="hidden">
<ol>
<li id="chapter1"><a epub:type="bodymatter" href="p2.xhtml">Chapter 1</a></li>
</ol>

</nav>
</body>
</html>


TOC.NCX

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
<!-- Generated by ePubCrawler 0.2.5 (http://www.rorohiko.com/ePubCrawler) -->
<head>
<meta name="dtb:uid" content="6527580c-8d53-448e-85bd-2e82c9a72a82" />
<meta name="dtb:depth" content="0" />
<meta name="dtb:totalPageCount" content="5" />
<meta name="dtb:maxPageNumber" content="5" />
</head>
<docTitle>
<text>YOUR TITLE HERE</text>
</docTitle>

<!-- **** -->

<navMap>

<navPoint id="p1" playOrder="1">
<navLabel>
<text>1</text>
</navLabel>
<content src="p1.xhtml" />
</navPoint>
(...skipping similar pages)
<navPoint id="p8" playOrder="8">
<navLabel>
<text>8</text>
</navLabel>


CONTENT.OPF

<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="book-id" version="3.0" prefix="rendition: http://www.idpf.org/vocab/rendition/# cc: http://creativecommons.org/ns#">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>TITLE</dc:title>
<dc:creator>AUTHOR</dc:creator>
<dc:date>2014</dc:date>
<dc:language>fr</dc:language>
<dc:identifier id="book-id">UUID NUMBER</dc:identifier>

<meta property="dcterms:modified">2012-05-09T08:58:00Z</meta>


<!-- FIXED-LAYOUT METADATA -->
<meta property="rendition:layout">pre-paginated</meta>
<meta property="rendition:orientation">portrait</meta>
<meta property="rendition:spread">none</meta>

<meta name="cover" content="img-cov" />
</metadata>
<manifest>

<item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml" />

<item id="nav" properties="nav" href="nav.xhtml" media-type="application/xhtml+xml"/>

<item id="css1" href="template.css" media-type="text/css" />
<item id="p1_css" href="p1.css" media-type="text/css" />
<item id="p2_css" href="p2.css" media-type="text/css" />
<item id="p3_css" href="p3.css" media-type="text/css" />
<item id="p4_css" href="p4.css" media-type="text/css" />
<item id="p5_css" href="p5.css" media-type="text/css" />
<item id="p6_css" href="p6.css" media-type="text/css" />
<item id="p7_css" href="p7.css" media-type="text/css" />
<item id="p8_css" href="p8.css" media-type="text/css" />
<item id="p9_css" href="p9.css" media-type="text/css" />
<item id="p10_css" href="p10.css" media-type="text/css" />
<item id="p11_css" href="p11.css" media-type="text/css" />
<item id="p12_css" href="p12.css" media-type="text/css" />
<item id="p13_css" href="p13.css" media-type="text/css" />
<item id="p14_css" href="p14.css" media-type="text/css" />
<item id="p15_css" href="p15.css" media-type="text/css" />
<item id="p16_css" href="p16.css" media-type="text/css" />
<item id="p17_css" href="p17.css" media-type="text/css" />
<item id="p18_css" href="p18.css" media-type="text/css" />
<item id="p19_css" href="p19.css" media-type="text/css" />
<item id="p20_css" href="p20.css" media-type="text/css" />
<item id="p21_css" href="p21.css" media-type="text/css" />
<item id="p22_css" href="p22.css" media-type="text/css" />
<item id="p23_css" href="p23.css" media-type="text/css" />
<item id="p24_css" href="p24.css" media-type="text/css" />
<item id="p25_css" href="p25.css" media-type="text/css" />
<item id="p26_css" href="p26.css" media-type="text/css" />
<item id="p27_css" href="p27.css" media-type="text/css" />
<item id="p28_css" href="p28.css" media-type="text/css" />
<item id="p29_css" href="p29.css" media-type="text/css" />
<item id="p30_css" href="p30.css" media-type="text/css" />
<item id="p31_css" href="p31.css" media-type="text/css" />
<item id="p32_css" href="p32.css" media-type="text/css" />


<item id="item01" media-type="application/xhtml+xml" href="p1.xhtml" />
<item id="item02" media-type="application/xhtml+xml" href="p2.xhtml" />
<item id="item03" media-type="application/xhtml+xml" href="p3.xhtml" />
<item id="item04" media-type="application/xhtml+xml" href="p4.xhtml" />
<item id="item05" media-type="application/xhtml+xml" href="p5.xhtml" />
<item id="item06" media-type="application/xhtml+xml" href="p6.xhtml" />
<item id="item07" media-type="application/xhtml+xml" href="p7.xhtml" />
<item id="item08" media-type="application/xhtml+xml" href="p8.xhtml" />
<item id="item09" media-type="application/xhtml+xml" href="p9.xhtml" />
<item id="item10" media-type="application/xhtml+xml" href="p10.xhtml" />
<item id="item11" media-type="application/xhtml+xml" href="p11.xhtml" />
<item id="item12" media-type="application/xhtml+xml" href="p12.xhtml" />
<item id="item13" media-type="application/xhtml+xml" href="p13.xhtml" />
<item id="item14" media-type="application/xhtml+xml" href="p14.xhtml" />
<item id="item15" media-type="application/xhtml+xml" href="p15.xhtml" />
<item id="item16" media-type="application/xhtml+xml" href="p16.xhtml" />
<item id="item17" media-type="application/xhtml+xml" href="p17.xhtml" />
<item id="item18" media-type="application/xhtml+xml" href="p18.xhtml" />
<item id="item19" media-type="application/xhtml+xml" href="p19.xhtml" />
<item id="item20" media-type="application/xhtml+xml" href="p20.xhtml" />
<item id="item21" media-type="application/xhtml+xml" href="p21.xhtml" />
<item id="item22" media-type="application/xhtml+xml" href="p22.xhtml" />
<item id="item23" media-type="application/xhtml+xml" href="p23.xhtml" />
<item id="item24" media-type="application/xhtml+xml" href="p24.xhtml" />
<item id="item25" media-type="application/xhtml+xml" href="p25.xhtml" />
<item id="item26" media-type="application/xhtml+xml" href="p26.xhtml" />
<item id="item27" media-type="application/xhtml+xml" href="p27.xhtml" />
<item id="item28" media-type="application/xhtml+xml" href="p28.xhtml" />
<item id="item29" media-type="application/xhtml+xml" href="p29.xhtml" />
<item id="item30" media-type="application/xhtml+xml" href="p30.xhtml" />
<item id="item31" media-type="application/xhtml+xml" href="p31.xhtml" />
<item id="item32" media-type="application/xhtml+xml" href="p32.xhtml" />

<item id="coverimage" href="images/Cover.jpg" media-type="image/jpeg" />
<item id="page1" href="images/BG_p1.jpg" media-type="image/jpeg" />
<item id="page2" href="images/BG_p2.jpg" media-type="image/jpeg" />
<item id="page3" href="images/BG_p3.jpg" media-type="image/jpeg" />
<item id="page4" href="images/BG_p4.jpg" media-type="image/jpeg" />
<item id="page5" href="images/BG_p5.jpg" media-type="image/jpeg" />
<item id="page6" href="images/BG_p6.jpg" media-type="image/jpeg" />
<item id="page7" href="images/BG_p7.jpg" media-type="image/jpeg" />
<item id="page8" href="images/BG_p8.jpg" media-type="image/jpeg" />
<item id="page9" href="images/BG_p9.jpg" media-type="image/jpeg" />
<item id="page10" href="images/BG_p10.jpg" media-type="image/jpeg" />
<item id="page11" href="images/BG_p11.jpg" media-type="image/jpeg" />
<item id="page12" href="images/BG_p12.jpg" media-type="image/jpeg" />
<item id="page13" href="images/BG_p13.jpg" media-type="image/jpeg" />
<item id="page14" href="images/BG_p14.jpg" media-type="image/jpeg" />
<item id="page15" href="images/BG_p15.jpg" media-type="image/jpeg" />
<item id="page16" href="images/BG_p16.jpg" media-type="image/jpeg" />
<item id="page17" href="images/BG_p17.jpg" media-type="image/jpeg" />
<item id="page18" href="images/BG_p18.jpg" media-type="image/jpeg" />
<item id="page19" href="images/BG_p19.jpg" media-type="image/jpeg" />
<item id="page20" href="images/BG_p20.jpg" media-type="image/jpeg" />
<item id="page21" href="images/BG_p21.jpg" media-type="image/jpeg" />
<item id="page22" href="images/BG_p22.jpg" media-type="image/jpeg" />
<item id="page23" href="images/BG_p23.jpg" media-type="image/jpeg" />
<item id="page24" href="images/BG_p24.jpg" media-type="image/jpeg" />
<item id="page25" href="images/BG_p25.jpg" media-type="image/jpeg" />
<item id="page26" href="images/BG_p26.jpg" media-type="image/jpeg" />
<item id="page27" href="images/BG_p27.jpg" media-type="image/jpeg" />
<item id="page28" href="images/BG_p28.jpg" media-type="image/jpeg" />
<item id="page29" href="images/BG_p29.jpg" media-type="image/jpeg" />
<item id="page30" href="images/BG_p30.jpg" media-type="image/jpeg" />
<item id="page31" href="images/BG_p31.jpg" media-type="image/jpeg" />
<item id="page32" href="images/BG_p32.jpg" media-type="image/jpeg" />


</manifest>


<spine toc="ncx">

<itemref idref="item01" />
<itemref idref="item02" />
<itemref idref="item03" />
<itemref idref="item04" />
<itemref idref="item05" />
<itemref idref="item06" />
<itemref idref="item07" />
<itemref idref="item08" />
<itemref idref="item09" />
<itemref idref="item10" />
<itemref idref="item11" />
<itemref idref="item12" />
<itemref idref="item13" />
<itemref idref="item14" />
<itemref idref="item15" />
<itemref idref="item16" />
<itemref idref="item17" />
<itemref idref="item18" />
<itemref idref="item19" />
<itemref idref="item20" />
<itemref idref="item21" />
<itemref idref="item22" />
<itemref idref="item23" />
<itemref idref="item24" />
<itemref idref="item25" />
<itemref idref="item26" />
<itemref idref="item27" />
<itemref idref="item28" />
<itemref idref="item29" />
<itemref idref="item30" />
<itemref idref="item31" />
<itemref idref="item32" />
<itemref idref="nav" linear="no"/>

</spine>
<guide>
<reference type="Cover" href="p1.xhtml" title="Cover"/>
<reference type="chapter1" href="p2.xhtml" title="Chapter 1"/>
</guide>

</package>

odedta 12-16-2014 02:23 PM

Overall your files seems ok. Just wanted to let you know that EPUB3 is supporting HTML5/CSS3 so the use of xhtml is not necessary, you should use html extension instead.
try changing the id of the nav.xhtml to toc maybe that confuses the validator... other than that I couldn't make out the problem.

If it's possible to upload your epub here it would be help.

eschwartz 12-18-2014 12:16 AM

@odedta,

It has always been possible to use either file extension, I don't believe it makes a difference one way or another.
http://www.w3schools.com/html/html_xhtml.asp

EPUB of every stripe requires XHTML structure (no permissive parsing like webdesign) and should have the application/xhtml+xml mimetype, but file extensions don't matter much.


@Firebrand007,

I don't see the
Code:

<nav epub:type="toc" id="toc">
section in your nav.xhtml

odedta 12-20-2014 03:30 AM

Quote:

Originally Posted by eschwartz (Post 3005252)
@odedta,

It has always been possible to use either file extension, I don't believe it makes a difference one way or another.
http://www.w3schools.com/html/html_xhtml.asp

EPUB of every stripe requires XHTML structure (no permissive parsing like webdesign) and should have the application/xhtml+xml mimetype, but file extensions don't matter much.


@Firebrand007,

I don't see the
Code:

<nav epub:type="toc" id="toc">
section in your nav.xhtml

True, thanks for the insight.

Firebrand007 01-01-2015 04:43 PM

Hi Odedta and Eschwartz,
Thanks for taking the time to answer me with suggestions ! Much appreciated !
(and sorry for the late answer due to the end of year celebrations)

>>try changing the id of the nav.xhtml to toc maybe that confuses the validator...
I had actually tried that already, and got another error - if I remember well, the Validator then told me that my nav must "supply a landmarks".

Before getting Eschwartz's answer, I rebuilt all my files from scratch, using a template from a commercially released epub, and this time it worked well.
I'm pretty sure Eschwartz was right (>>I don't see <nav epub:type="toc" id="toc"> in your nav file ), this line is just what was missing and needed.
Those error messages are way too cryptic :)

thanks again !

eschwartz 01-02-2015 02:29 AM

Hey, just as long as you got the book to work. :)

And funnily enough, I was offline too. ;)

Christmas break, you see.
You may ask (well, other people anyway) why does my Jewish school give off for Christmas? :snicker: Answer: The high school teachers get off then anyway, why not have that coincide with Winter Break.
Heehee this one never fails to crack me up. :rofl: :rolleyes:

JSWolf 01-02-2015 11:00 PM

If it's for iBooks, it's NOT ePub 3. It's some bastardized version.


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

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.