View Full Version : Problem with links


Dominik_
02-24-2010, 08:13 AM
Hi all, ;)

I am beginner in writing epubs. I have got a problem with links.

Here is the file: Buch_inhalt.html
The translation in english is book_content


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

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">

<head>
<title>leeres Buch</title>

<link rel="stylesheet" type="text/css" href="Buch_style.css" />
<link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/>
</head>


<body>

<div id="contents">
<h2>Inhaltsverzeichnis</h2>
<ul>
<li><a href="Buch_intro.html">Vorwort</a></li>
<li><a href="Buch_Kapitel_01.html">Kapitel 1</a></li>
<ul>
<li><a href="Buch_Kapitel_01.html#1_1">1.1</a></li>
<li><a href="Buch_Kapitel_01.html#1_2">1.2</a></li>
<li><a href="Buch_Kapitel_01.html#1_3">1.3</a></li>
<li><a href="Buch_Kapitel_01.html#1_4">1.4</a></li>
</ul>
<li><a href="Buch_Kapitel_02.html">Kapitel 2</a>
<ul>
<li><a href="Buch_Kapitel_02.html#2_1">2.1</a></li>
<li><a href="Buch_Kapitel_02.html#2_2">2.2</a></li>
<li><a href="Buch_Kapitel_02.html#2_3">2.3</a></li>
<li><a href="Buch_Kapitel_02.html#2_4">2.4</a></li>
</ul>
</li>
<li><a href="Buch_Kapitel_03.html">Kapitel 3</a></li>
<ul>
<li><a href="Buch_Kapitel_03.html#3_1">3.1</a></li>
<li><a href="Buch_Kapitel_03.html#3_2">3.2</a></li>
<li><a href="Buch_Kapitel_03.html#3_3">3.3</a></li>
<li><a href="Buch_Kapitel_03.html#3_4">3.4</a></li>
</ul>
<li><a href="Buch_Kapitel_04.html">Kapitel 4</a></li>
<ul>
<li><a href="Buch_Kapitel_04.html#4_1">4.1</a></li>
<li><a href="Buch_Kapitel_04.html#4_2">4.2</a></li>
<li><a href="Buch_Kapitel_04.html#4_3">4.3</a></li>
<li><a href="Buch_Kapitel_04.html#4_4">4.4</a></li>
</ul>
<li><a href="Buch_Kapitel_05.html">Kapitel 5</a></li>
<ul>
<li><a href="Buch_Kapitel_05.html#5_1">5.1</a></li>
<li><a href="Buch_Kapitel_05.html#5_2">5.2</a></li>
<li><a href="Buch_Kapitel_05.html#5_3">5.3</a></li>
<li><a href="Buch_Kapitel_05.html#5_4">5.4</a></li>
</ul>
<li><a href="Buch_Kapitel_06.html">Kapitel 6</a></li>
<ul>
<li><a href="Buch_Kapitel_06.html#6_1">6.1</a></li>
<li><a href="Buch_Kapitel_06.html#6_2">6.2</a></li>
<li><a href="Buch_Kapitel_06.html#6_3">6.3</a></li>
<li><a href="Buch_Kapitel_06.html#6_4">6.4</a></li>
</ul>
<li><a href="Buch_Kapitel_07.html">Kapitel 7</a></li>
<ul>
<li><a href="Buch_Kapitel_07.html#7_1">7.1</a></li>
<li><a href="Buch_Kapitel_07.html#7_2">7.2</a></li>
<li><a href="Buch_Kapitel_07.html#7_3">7.3</a></li>
<li><a href="Buch_Kapitel_07.html#7_4">7.4</a></li>
</ul>
<li><a href="Buch_Kapitel_08.html">Kapitel 8</a></li>
<ul>
<li><a href="Buch_Kapitel_08.html#8_1">8.1</a></li>
<li><a href="Buch_Kapitel_08.html#8_2">8.2</a></li>
<li><a href="Buch_Kapitel_08.html#8_3">8.3</a></li>
<li><a href="Buch_Kapitel_08.html#8_4">8.4</a></li>
</ul>
<li><a href="Buch_Kapitel_09.html">Kapitel 9</a></li>
<ul>
<li><a href="Buch_Kapitel_09.html#9_1">9.1</a></li>
<li><a href="Buch_Kapitel_09.html#9_2">9.2</a></li>
<li><a href="Buch_Kapitel_09.html#9_3">9.3</a></li>
<li><a href="Buch_Kapitel_09.html#9_4">9.4</a></li>
</ul>
</div>


</body>

</html>



The following code is the file Buch_Kapitel_01.html

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

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">

<head>
<title>leeres Buch</title>

<link rel="stylesheet" type="text/css" href="Buch_style.css" />
<link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/>
</head>


<body>

<div id="text">

<div class="section" id="anfang">
<h2>Chapter 1 h2</h2>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<h3 id="1_1">1.1</h3>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<h3 id="1_2">1.2</h3>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<ul>
<li><code>lang</code>Text Text Text Text Text Text <code>xml:lang</code>Text Text Text Text </li>
<li>Text Text Text Text Text Text Text Text Text </li>
</ul>

<h3 id="1_3">1.3</h3>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<h3 id="1_4">1.4</h3>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<div class="codeblock">
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text <br/>
</div>

</div><!--section-->

</div><!--text-->


</body>

</html>


The following code is file Buch_Kapitel_02.html:

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

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">

<head>
<title>leeres Buch</title>

<link rel="stylesheet" type="text/css" href="Buch_style.css" />
</head>


<body>

<div id="text">

<div class="section" id="anfang">
<h2>Kapitel 2 h2</h2>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<h3 id="2_1">2.1</h3>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<h3 id="2_2">2.2</h3>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<ul>
<li><code>lang</code>Text Text Text Text Text Text <code>xml:lang</code>Text Text Text Text </li>
<li>Text Text Text Text Text Text Text Text Text </li>
</ul>

<h3 id="2_3">2.3</h3>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<h3 id="2_4">2.4</h3>

<p>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>

<div class="codeblock">
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text <br/>
</div>

</div><!--section-->

</div><!--text-->


</body>

</html>



My problem is:
I use my Sony PRS-600 device to watch this book. If I touch the Link 1.1, the Sony-device doesnt show me the chapter 1.1. it shows me the chapter 2.

Do you find an error in my code?

With the Preview-function in the software Calibre all links work correctly.



Dominik ;)

DaleDe
02-24-2010, 04:08 PM
As I recall the problem is that id tags like letters at the beginning rather than numbers. Try prefixing a letter to your id tags.

Dale

Dominik_
02-25-2010, 02:29 PM
Thank you. This was my mistake. Now it works correctly.
:thanks: