![]() |
#1 |
Connoisseur
![]() Posts: 64
Karma: 10
Join Date: Sep 2015
Location: Yerevan, Armenia
Device: none
|
doubled id
These code examples are OK for Sigil, but not for Calibre.
Code:
<dd>Սա իմ <span id="b40b2">---------------</span> է։ (քույր)</dd> <dd>Իմ <span id="b40b2">---------------</span> այնտեղ է աշխատում։ (հայր)</dd> <h4 id="sigil_toc_id_217">Declension ----------</h4> <p id="sigil_toc_id_217">a) For the person to whom ---------------</p> <p id="sigil_toc_id_217">b) ---------------</p> |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,936
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
They really are NOT OK
id is a single use You can only go to one place. ID marks that. Where do you go when there are 3 'same places'? ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Is there a question here?
P.S. "id" needs to be unique, it is part of the HTML spec. |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,489
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Not sure what you mean by "OK for Sigil." If you mean that Sigil's Well-Formed Check doesn't flag it as a problem, then you're right. It doesn't. The Well-Formed Check is only concerned with syntactical problems like no missing quotes, and making sure all tags are properly closed and no improper nesting is going on. Things that could prevent an epub from being saved. It's not a "validator."
You'll be happy to know, however, that both the EpubCheck plugin and the Flightcrew plugin (epub2-only) will flag duplicate ids as a problem for you. Sigil itself should NOT be creating any duplicate ids, though, if that's what you mean. If so, we'll need steps to recreate it. I've certainly never encountered a situation where one of Sigil's automated routines created any duplicated ids before. Last edited by DiapDealer; 07-27-2016 at 02:13 PM. |
![]() |
![]() |
![]() |
#5 | |
Connoisseur
![]() Posts: 64
Karma: 10
Join Date: Sep 2015
Location: Yerevan, Armenia
Device: none
|
Quote:
But id="sigil_toc_id_217" was created by Sigil, may be on <h5> -> <p>. I don't realy know whay, but there is 9 different doubled id="sigil_toc_id_xxx". Always with <h2 ... 5> and <p>. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,489
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
But if you can demonstrate some consistently reproducible steps where Sigil generates a duplicate ID in the same file, we'll certainly try to track it down. Last edited by DiapDealer; 07-27-2016 at 02:41 PM. |
|
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,569
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Something is strange. Sigil only inserts Sigil toc ids on header tags h1 - h6 as done when building a table of contents and never on p tags unless you manually add that to the toc.
Did you rebuild the table of contents without validating the epub was correct first? Did you use some other Sigil or outside tool? |
![]() |
![]() |
![]() |
#8 | |
Connoisseur
![]() Posts: 64
Karma: 10
Join Date: Sep 2015
Location: Yerevan, Armenia
Device: none
|
Quote:
I find out this when try to make link to <h1>, wihtout hand made id. So, link is possible direct to the file. It's the same when there is only one <h1> in the html file. Yes, I rebuild contens 2-3 times with no effect, so I delete all doubled id - after this id was recreated in right way. No, I use Sigil only to egit epub. All others programs to view only. |
|
![]() |
![]() |
![]() |
#9 | |
Connoisseur
![]() Posts: 64
Karma: 10
Join Date: Sep 2015
Location: Yerevan, Armenia
Device: none
|
Quote:
And I never edit id made by Sigil. I have about 500 id, and I have no idea why 9 are double. Not sure that I can reproduce this... |
|
![]() |
![]() |
![]() |
#10 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,569
Karma: 5703586
Join Date: Nov 2009
Device: many
|
It almost looks like the p tags were at one time nested inside the h tag (illegal but it does display the way you expect in most browsers) and something split them out passing all attributes to its children (including the id). I just have no idea how that could happen inside of CodeView or the current Sigil tools.
|
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,698
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
I was able to reproduce this non-issue with the following steps:
1. Create a new Sigil epub2 book. 2. Enter Chapter 1 in Code View mode, highlight it and apply a heading tag, e.g. h1 3. Repeat step 2 for Chapter 2. 4. Generate an NCX TOC to add an id value to the Chapter 2 h1 tag. 5. Switch to Book View mode, select Chapter 2 and copy it. 6. Paste the text and select No, when asked whether the text should be pasted as plain text. 7. Select the text pasted in step #6 and click the p button on the toolbar. This will change the tag from h1 to p, but won't delete the id value. (Of course, you could also copy the heading tag in Code View mode, select only the copied text and click the p button.) IMHO, this is pretty much the only way how the OP could have ended up with duplicate ids. |
![]() |
![]() |
![]() |
#12 |
Connoisseur
![]() Posts: 64
Karma: 10
Join Date: Sep 2015
Location: Yerevan, Armenia
Device: none
|
It seems, that doubled numeration was the result of chapter's division.
When I divided one long chapter into two shorter parts within the Book View mode - not text only, header was diveded too. |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,698
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Your sample file does not contain ids and split markers. Please add ids and split markers in a location that causes this problem and re-attach the file.
Last edited by Doitsu; 08-11-2016 at 10:35 AM. |
![]() |
![]() |
![]() |
#14 |
Connoisseur
![]() Posts: 64
Karma: 10
Join Date: Sep 2015
Location: Yerevan, Armenia
Device: none
|
|
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,698
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
@KevinH and Diapdealer:
I was finally able to reproduce this issue: 1. Copy the following code to Section0001.xhtml in an empty epub: Spoiler:
2. Switch to Book View mode, enter a random string, e.g. XXX, before the heading text and press Enter. Repeat this several times. 3. Press CTRL+Enter or select Split At Cursor. This will generate the following code in the first split file: Spoiler:
Needless to say that this is a user input error and shows once again that editing text in Book View mode is a bad idea. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Removing doubled-up book covers | CharredScribe | Calibre | 1 | 08-15-2015 12:33 PM |
Non-breaking space (doubled) bug | Camelot | Sigil | 49 | 02-13-2015 04:20 PM |
PRS-T1 sync has doubled my collections | Falchetta | Sony Reader | 2 | 07-08-2012 06:11 PM |
Chapters are doubled in Table of Contents on Kobo...help!!! | capsolo | ePub | 1 | 06-20-2010 12:58 PM |
Every book in my library now doubled up on my 505 | Gameboy213 | Sony Reader | 11 | 05-12-2009 06:49 PM |