View Single Post
Old 07-25-2011, 05:15 AM   #1
Maal656
Junior Member
Maal656 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2011
Device: none
Trying to add link in image within svg

Hello!
In a epub I'm formatting there is a map. As it is shown very small in the screen, I want to divide it in three different part and to include links to more detailed views of the map:

Here is my code, with only first hyperlink included:

Code:
<body>
  <div>
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 448 800" width="100%">
      <a xlink:href="../Text/MapL.xhtml">

      <image height="267" transform="matrix(1 0 0 1 0 0)" width="448" xlink:href="../Images/mapa01.jpg"></image></a>

      <image height="266" transform="matrix(1 0 0 1 0 267)" width="448" xlink:href="../Images/mapa02.jpg"></image>

      <image height="267" transform="matrix(1 0 0 1 0 533)" width="448" xlink:href="../Images/mapa03.jpg"></image>
    </svg>
  </div>
</body>
The problem is that working with Sigil, the code:
Code:
<a xlink:href="../Text/MapL.xhtml">

      <image height="267" transform="matrix(1 0 0 1 0 0)" width="448" xlink:href="../Images/mapa01.jpg"></image></a>
is automatically transformed to: (Note the position of </a>)

Code:
<a xlink:href="../Text/MapL.xhtml"></a>

      <image height="267" transform="matrix(1 0 0 1 0 0)" width="448" xlink:href="../Images/mapa01.jpg"></image>
so no hyperlink is accesible in the epub.

Someone could clarify my if I'm doing something wrong? Thank you!!
Maal656 is offline   Reply With Quote