View Full Version : links and extensions


Iain
10-09-2010, 08:34 PM
I seem to be struggling with links in ePub documents.

I'm creating a toc file and including an link to the chapter in question.
The link looks like

<a href="Chapter10.html">Chapter 10</a>

Chapter10.html exists and the link appears as you would expect, but when I click / tap on it the first document in the spine opens (in the calibre viewer it opens the correct document but in an external browser).

Also, I'm a little uncertain what extension I should provide. until recently I was using .xhtml, but a correspondant told me that not all readers understand that. What's a safe extension to use for the content files?

Thanks!

Iain

Jellby
10-10-2010, 04:45 AM
The link should work as you write it. Does the "Chapter10.html" file exist inside the .epub file? Is it in the same folder as the file where the link appears? Is "Chapter10.html" included in the manifest and in the spine? Try validating the .epub with epubcheck or FlightCrew.

As for the extension, you can use any one in principle. I haven't seen any problem with .html or .xhtml. But whatever you use the "media-type" (and the content) must be XHTML (sort of)

Iain
10-10-2010, 06:47 AM
:o

It seems that I'm blighted by too many years of windows programming. The links are case sensitive so I'm hrefing "Chapter0.html" when it is called "chapter0.html".

thanks for your reply on the other.

Iain

Adjust
10-13-2010, 01:46 AM
:o

It seems that I'm blighted by too many years of windows programming. The links are case sensitive so I'm hrefing "Chapter0.html" when it is called "chapter0.html".

Yes, this is a constant source of frustration for me as well...now though I'm in the habit of when it errors, that's the first thing I check for