04-18-2013, 03:55 PM | #1 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
Diagnosing a Sigil ID nightmare
I'm correcting an epub that has havoc reined by Sigil. For some apparent reason the particular person asked me to examine there epub and I said ok before looking at it. Now I have a 600 page epub with almost 2500 lines of code from Sigil that has duplicate ids. Can someone please explain this process to me and why Sigil does this? I typically only hand code my epubs.
Code:
<p class="tx" id="d7e791985">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> <p class="tx" id="d7e791985">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> <p class="tx" id="d7e791985">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> |
04-18-2013, 04:09 PM | #2 | |
Well trained by Cats
Posts: 29,817
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
You only need id's to link, and then, only if not at the top of file. |
|
04-18-2013, 04:37 PM | #3 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
I know that. My apologies for not explaining what I meant. Im curious to know WHY Sigil does it.
|
04-18-2013, 05:03 PM | #4 |
Grand Sorcerer
Posts: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
There would normally have to be something drastically wrong with the epub in the first place for Sigil to make anything other than small changes to the code on it's own. I find it highly doubtful that Sigil auto-inserted a bunch of ids into p tags (duplicate or otherwise), myself. Not unless it was handed a complete mess to begin with and it just did its best cope. It'd be nice to see a sample of what the epub looked like before you opened it in Sigil.
|
04-19-2013, 01:45 AM | #5 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
As DiapDealer already pointed out, it's highly unlikely that Sigil did this. Since styles can also be assigned by ids, it's possible that these duplicated ids are used for style assignments.
Did you check the stylesheet for id based styles? For example: Code:
#d7e791985 { text-align: center; } |
04-19-2013, 10:04 AM | #6 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
yes I have checked the CSS and Im told the entire epub was created in Sigil. I never use Sigil so I wanted to know from here if this is something common Sigil does.
|
04-19-2013, 10:40 AM | #7 |
Well trained by Cats
Posts: 29,817
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
id is not class
I would not expect to see that value in the CSS. ' class="tx" ' That book may have started elsewhere and was malformed at import. Tidy, then *fixed* it Remember GIGO |
04-19-2013, 11:26 AM | #8 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
lol you say that but the horror stories I can talk about..
|
04-19-2013, 11:49 AM | #9 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Code:
<?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"> <head> <title></title> <style type="text/css"> #d7e791985 { text-align: center; color: red; } </style> </head> <body> <p id="d7e791985">A centered, red paragraph.</p> </body> </html> However, since the original epub creator didn't use these particular ids to assign a style and apparently doesn't reference them anywhere else, it looks more like a global search and replace action gone awry. |
|
04-23-2013, 09:27 AM | #10 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
it wont pass epubcheck because it goes back to HTML validation in regards to duplicate ids
such as: Code:
<?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"> <head> <title></title> <style type="text/css"> #d7e791985 { text-align: center; color: red; } </style> </head> <body> <p id="d7e791985">A centered, red paragraph.</p> <p id="d7e791985">A centered, red paragraph.</p> </body> </html> |
04-23-2013, 10:07 AM | #11 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
|
04-23-2013, 11:22 AM | #12 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Aug 2012
Location: Nashville, Tn
Device: ipad, Kindle Fire
|
|
05-23-2013, 01:17 AM | #13 |
Member
Posts: 14
Karma: 10
Join Date: May 2013
Device: Sony Reader PRS T1
|
Copying and pasting in Sigil copies ids as well as everything else. If you are in book view you won't know this - it is only obvious in code view. I've found that just fiddling with paragraphs can result in duplicate ids across successive paragraphs without copying.
It seems to me that if duplicate ids are forbidden, Sigil should be smart enough to not create duplicate ids automatically - when copying, it should generate a new id for the pasted item. Ditto for generating multiple paragraphs out of one. |
05-23-2013, 03:13 AM | #14 | ||
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Given how basic that error is, though, I wouldn't count on not finding other mistakes just as basic and just as painful. Quote:
Hitch |
||
05-23-2013, 04:52 AM | #15 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Last edited by Doitsu; 05-23-2013 at 03:07 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TOC Nightmare, Help please! | oasis88 | Workshop | 2 | 09-24-2012 08:15 AM |
Help diagnosing SIGSEGV issue | seabream | Plugins | 3 | 07-31-2012 11:58 PM |
An UPS nightmare: can someone help me? | central11 | Amazon Kindle | 52 | 08-12-2011 05:12 PM |
The Nightmare Within now just $.99! | Glen Krisch | Self-Promotions by Authors and Publishers | 8 | 05-05-2011 07:41 PM |
HP Nightmare | Bob Russell | Lounge | 27 | 05-10-2007 04:37 PM |