01-12-2009, 12:01 PM | #1 |
Connoisseur
Posts: 59
Karma: 10
Join Date: Nov 2008
Device: none
|
Crossreferences (xref) always lead to top of page
Hi there,
I try to create XREFs in my epubs. The link should lead to a specific position in a document. But clicking on a link always leads to the top of the specific document and NOT to the position where the target ist specified. This happens no matter if I use <xref.. or <link... I have tested it with ADE. Here is what I do in XML-code: XREF: <entry align="left" valign="top"><xref linkend="654321"/></entry> XREF-target: <para id ="654321" xreflabel ="44"><token>44</token>Der Begriff...</para> or I do this: XREF: <entry align="left" valign="top"><link linkend="123456">3</link></entry> XREF-target: <para id="123456"><token>3</token>Das TMG wu...</para> But whatever I try, I always get to the top of the HTML-Page when clicking the link in ADE Does someone has a idea? Thanks Georg |
01-12-2009, 12:15 PM | #2 |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Hmm... I don't know how that markup is supposed to work, but those tags are not mentioned in the required XHTML tags: http://www.idpf.org/2007/ops/OPS_2.0...tml#Section2.2
Is is maybe some ADE-specific extension? |
Advert | |
|
01-13-2009, 04:51 AM | #3 |
Connoisseur
Posts: 59
Karma: 10
Join Date: Nov 2008
Device: none
|
Sorry, the code above is not the resulting XHTML. It is the original XML. I use docbook.xsl to convert the XML to XHTML. The xml complies to the docbook specification.
The resulting XHTML looks like this: here is the link <a class="link" href="ch01.html#123456">4</a> and it points to this target (within the same file ch01.html): <p><a id="123456"/><span class="token">1</span>Das Telemediengesetz... </p> Clicking the link in ADE leads to the top of page ch01.html. Unzipping the ebook and opening ch01.html in firefox shows me, that the links work fine! It leads me to the exact position! But not in ADE Thanks georg |
01-13-2009, 09:05 AM | #4 |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
If your fragment identifier actually is "123456" or otherwise begins with a number, there's your problem. The letter of the XHTML spec requires that the values of 'id' attributes match the pattern [A-Za-z][A-Za-z0-9:_.-]*, and thus must begin with an ASCII alphabetic character. Other renderers are a bit more flexible, but in my quick test ADE actually does seem to care (example attached).
|
01-13-2009, 09:38 AM | #5 |
Connoisseur
Posts: 59
Karma: 10
Join Date: Nov 2008
Device: none
|
Indeep. I tried id="abcdef" instead of id="123456".
That did the trick Many, many thanks! Georg |
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
web page image incorrecly appears at top of conversion | JPD | Calibre | 7 | 09-28-2010 11:59 AM |
larger top page margin when printing to pdf? | whbenson | Sigil | 0 | 05-15-2010 12:38 AM |
Scene breaks at page top/bottom | radius | Workshop | 20 | 12-15-2009 06:59 PM |
How to encpode "top of page blurb" for html2lrf? | sahlberg | Calibre | 3 | 10-20-2008 03:58 AM |
quick hello w/ hopes of losing the message @ top of page | xr4ti | Introduce Yourself | 5 | 02-04-2008 02:34 PM |