Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-20-2013, 02:27 PM   #1
leijoninna
Junior Member
leijoninna began at the beginning.
 
Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad3
fixed layout landmarks issue

I've been working on creating my very first fixed layout ePub3 for iBooks. After a lot of tweaking, I managed to get the epubcheck errors down to only one, and it doesn't make the file less functional:

element "nav" not allowed anywhere; expected the element end-tag or element "bindings"

This refers to the "landmarks" section in the opf file. I read on other forums and in documentation that the guide section has been deprecated and should be replaced with the landmarks. I've kept the guide section for backwards compatibility.

I also found one article from about a year ago that referred to the landmarks section as not really being used by most readers (including iBooks). I tried my book on iPad, Readium an AZARDI, and none of them seem to really take any notice of neither the guide nor the landmarks section. For example, my "ibooks:reader-start-page" was completely ignored by all readers despite declaring the ibooks prefix.

So what is best practice here? Just go with the guide section, or keep landmarks and ignore the epubcheck error?

(btw, AZARDI makes my book look weird since it makes the front page the first odd page, and my first odd page an even page. Messes up all my two-page spreads…)
leijoninna is offline   Reply With Quote
Old 05-20-2013, 06:50 PM   #2
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Almost certainly you have a syntax error in the toc.xhtml file. You should post the code, if you want help solving it. And you should consider solving it, because it might potentially break parsing the toc file.

BTW, the specs are here: http://www.idpf.org/epub/30/spec/epu...ypes-landmarks
AlPe is offline   Reply With Quote
Advert
Old 05-21-2013, 10:28 AM   #3
leijoninna
Junior Member
leijoninna began at the beginning.
 
Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad3
I was told that the landmarks section should be in the content.opf document. The opf is where the epubcheck error comes from. Or maybe I wasn't told, but it just hasn't been clear anywhere. And it would be the safest to assume since this is where the guide section was, that the landmarks should replace.

Is this not correct? Just want to make sure before I post any code. Otherwise, just tell me exactly where the landmarks section should be and it might be a quick fix.

There is most probably nothing wrong with the section itself, I have seen the spec and it looks exactly like it.
leijoninna is offline   Reply With Quote
Old 05-21-2013, 10:36 AM   #4
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Now I undestand the error you get.

No, the landmarks usually go into the XHTML TOC which replaced the "old" NCX TOC.

Please read the specifications (I gave you the relevant link in the post above) and/or inspect some examples of EPUB 3 files, e.g. from:

http://code.google.com/p/epub-samples/

or

http://www.smuuks.it/index.php/en/projects
AlPe is offline   Reply With Quote
Old 05-22-2013, 07:48 AM   #5
leijoninna
Junior Member
leijoninna began at the beginning.
 
Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad3
Ok, thanks, now I have gotten rid of the error. It wasn't very clear in the documentation.

The ibooks:reader-start-page that some people suggest you can add to the landmarks section (to get the book to open there) still doesn't work. It is a declaration issue. Just putting it in gives the error Undeclared prefix: ibooks. I try to declare it in the html tag with:

prefix= "ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/"

...just like I did in the package tag in opf file without issues. But then the error is in the toc.xhtml - epubcheck says element "prefix" not allowed here.

I have added a screenshot of my toc.xhtml file with the prefix element added, if you can see anything wrong with it. (I have only one list item in the first nav list since I wanted ibooks to only show the visual TOC)
Attached Thumbnails
Click image for larger version

Name:	toc.png
Views:	232
Size:	70.1 KB
ID:	106119  
leijoninna is offline   Reply With Quote
Advert
Old 05-22-2013, 09:35 AM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Did you look at this example of usage? https://github.com/reitermarkus/epub...PS/package.opf

Note that there is also a reference added to the <package> area
PeterT is offline   Reply With Quote
Old 05-23-2013, 02:57 AM   #7
leijoninna
Junior Member
leijoninna began at the beginning.
 
Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad3
Yes, I also use the reference in package in the opf file and there it works fine. But now that I moved the new landmarks section to the toc.xhtml I need to declare "ibooks" there as well, to not get an error. But it doesn't work, it says the element "prefix" is not allowed there.
leijoninna is offline   Reply With Quote
Old 05-23-2013, 06:05 PM   #8
Jim Lester
Evangelist
Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.Jim Lester is less competitive than you.
 
Jim Lester's Avatar
 
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
I'm pretty sure 'prefix' is not a legal attribute for the html element, which is what the error is telling you.

Have you tried using a xml namespace declaration instead?
ie xmlns:ibooks ="http://vocabulary........"
Jim Lester is offline   Reply With Quote
Old 05-24-2013, 12:46 PM   #9
leijoninna
Junior Member
leijoninna began at the beginning.
 
Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad3
Thanks :) However, that was one of the first things I tried.

But, after studying the error and all the attributes that the epubcheck expected instead of "prefix", I did find one named "epub:prefix". So epub:prefix="ibooks: http://vocabulary....." did solve the error and there are no more issues in epubcheck.

I did not work anyway with the "ibooks:reader-start-page", it still opens up to the front page. So I guess that is a bit of a lost case.

Thanks for all the help, I will probably have more questions along the way. Great forum!

Last edited by leijoninna; 05-24-2013 at 12:50 PM.
leijoninna is offline   Reply With Quote
Old 05-30-2013, 02:44 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Fixed layout in iBooks is not ePub. This thread should go in the Apple forum since it relates to iBooks which is an Apple product. If it related to ePub in iBooks, sure, this would be the appropriate forum. But as it's not part of ePub, it doesn't belong here.
JSWolf is offline   Reply With Quote
Old 05-30-2013, 02:45 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Jim Lester View Post
I'm pretty sure 'prefix' is not a legal attribute for the html element, which is what the error is telling you.

Have you tried using a xml namespace declaration instead?
ie xmlns:ibooks ="http://vocabulary........"
I know this is off-topic, but can you confirm the rumor of the 1.5 firmware for the nook STR?
JSWolf is offline   Reply With Quote
Old 06-14-2013, 04:24 AM   #12
leijoninna
Junior Member
leijoninna began at the beginning.
 
Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad3
Quote:
Originally Posted by JSWolf View Post
Fixed layout in iBooks is not ePub. This thread should go in the Apple forum since it relates to iBooks which is an Apple product. If it related to ePub in iBooks, sure, this would be the appropriate forum. But as it's not part of ePub, it doesn't belong here.
Which is the appropriate forum then? The only Apple forum I can find is the Apple Device forum. People there only seem to discuss devices, and coding questions are mostly left unanswered.
leijoninna is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text with Fixed Layout Gerlyn Sigil 11 04-09-2013 07:03 AM
Fixed layout epub curiousgeorge ePub 3 01-18-2013 04:27 PM
Fixed layout in kobo vamsundar Kobo Reader 0 12-26-2012 02:14 AM
Issue in viewing the Fixed Layout ePub in iPad sundar ePub 2 07-23-2011 04:10 AM
iPad Fixed-layout marcelo2605 ePub 2 06-01-2011 10:10 PM


All times are GMT -4. The time now is 06:10 PM.


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