![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Tolerance and parsing mistakes
Hi
Sigil 9.2. Archlinux 64 bits. I now switch often between the Calibre Editor and Sigil (the lattter for some more advanced features or plugins). I like better the Editor because of its smooth selecting. I have the feeling that Sigil is "reluctant" to select and does it by small hiccups. As an editing tool, Sigil should maybe be a bit more tolerant to user's mistakes. A case in point: on a fairly complex EPUB, on the Editor, I modified two tags on two different chapters and closed them, mistakenly of course, with /subtitle instead of /p. That's life... ![]() I switched to Sigil to do another task: it informed me that two chapters were ill-formed and that the EPUB could not be opened. God! If the Editor does the same, I shall be kicked out of my book. Happily, the Editor welcomed me back and informed me of these two parsing errors. The point I wanted to make is that, as an editing tool, Sigil maybe should be more tolerant to parsing errors of this kind. Last edited by roger64; 01-20-2016 at 08:20 PM. |
![]() |
![]() |
![]() |
#2 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,361
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Quote:
If you don't have the "Mend Code on Open" checked, it would have opened the epub, showed you a warning about the well-formed issue, and you would have been able to run the "Well-Formed" check (F7) and it would have informed you exactly where the problem was. Well-formed errors will, quite simply, NOT stop Sigil from opening an epub. Ever. You're exaggerating. Like the calibre editor more all you want, but please don't come here and stretch the truth about problems you're having with Sigil. Last edited by DiapDealer; 01-20-2016 at 09:10 PM. |
||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,633
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
On the first issue of 'smooth selecting' - care to elaborate. Oh, I see DD already has.
Windows here - My perception has always been that the calibre editor has more of lag when selecting text. To select text I use the keyboard, never the mouse. Been a while since I did any text editing with calibre editor though, so perhaps it's faster now. Never noticed any lags or stutters in Sigil - unlike almost any browser Ψ² I also get the messages that DD speaks of when opening some public domain ePUBs published by EU agencies such as the EIB! BR |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
@DiapDealer
Please believe me, I don't intend to strech the truth ![]() I did not invent this message from Sigil. OK next time, I'll send you a PM if you find my messages too unpleasant. Meanwhile, I will try to reproduce this. Cheers |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I wrote again the two mistaken subtitles. I got this. There was also another error I don't remember. This time the message is less frightening because I can't update only the two wrong chapters.
But I am still puzzled, what interest should I have not to speak the truth? ![]() For the selection, good to know I am not alone experimenting this. ![]() Last edited by roger64; 01-21-2016 at 05:01 AM. Reason: experimenting |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
The people who write software are heavily invested in it, just like the people who write books. Neither sort takes criticism well.
And since English is not your native language, your post may have seemed harsher than you intended. Don't take it personally! You can learn much on this forum. |
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,361
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
@roger64: Your image of the error still in NO way shows an epub that Sigil "can't open." After you dismiss thar error message, just run a Well Formed check to find where the error is and fix it manually.
My problem is with you saying that Sigil "can't open" the epub when that's simply not true. Mismatched tags are not enough of a problem to make Sigil fail to open an epub. In fact, there would have to serious structural issues involved for an epub to be unable to be opened by Sigil. Sigil will bark and warn you upon opening it about these well-formed issues, sure. But it won't stop you from opening and fixing them (either automatically or manually). Last edited by DiapDealer; 01-21-2016 at 07:31 AM. |
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,361
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I resent that. I take valid criticsm very well. Saying Sigil "can't open" an epub with well-formed errors, however, isn't crticism. It's a falsehood. Big difference.
I think roger64 would be very happy to tell you how helpful and appreciative I've been in fixing issues he's brought up with Sigil on Linux in the past. Last edited by DiapDealer; 01-21-2016 at 07:31 AM. |
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
![]() I certainly did not try to be mischievous and reported what I've seen displayed just because it surprised me even if my English is poor. Next time, I promise, you'll get a screenshot. I sincerely wishes the best for Sigil because I begin to use it again. |
|
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,361
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
No problem, Roger. Getting a sample epub that will exhibit the issue would be extremely helpful as well. If you have an epub that calibre will allow you to edit that Sigil absolutely cannot open (I mean can't here, mind you, not "opens after errors/warnings"), then of course we will want to remedy that, if possible. All I'm saying is that the well-formed html issue you described (wrong closing tag), wouldn't be enough to make that happen. The tolerance for that kind of parsing error, that you were requesting, is already present. Whether there's a different kind of issue Sigil should be more tolerant of is yet to be determined.
Apologies for "snapping" at you, but you have to admit that you didn't really present this in a typical bug-report kind-of-way. ![]() |
![]() |
![]() |
![]() |
#11 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,912
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
A 'Well formed' error DOES break the books paths (When Sigil stuffs Images, Styles). The links are NOT updated in the book, resulting in many broken images and no stylesheets and possible MASSIVE loss if you run a clean unused against the book ![]() |
|
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,361
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() Seriously, it's not Tidy. Turn it on and see for yourself. You can't blame Sigil for problems that might arise from instructing it NOT to fix the errors that it can easily and absolutely non-destructively fix. Turning it off is essentially telling Sigil that you're willing to work with broken code (or that you know absolutely that the the code is perfectly valid beforehand). It would then be up to the user (who was notified upon opening that there were problems) to manually fix that which they told Sigil specifically NOT to fix before proceeding to run any automated tasks. Again: Mend is not Tidy. Turning it off when opening an epub entails taking full responsibility for properly dealing with problematic markup. It should only be turned off by those willing to accept that responsibility. Last edited by DiapDealer; 01-21-2016 at 12:20 PM. |
|
![]() |
![]() |
![]() |
#13 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,487
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
No surprise here but DiapDealer is exactly right. The gumbo parser is an automatic repair parser using the exact same html5 parsing rules as all major browsers. It will detect things that even epubcheck will not complain about and happily fix them if allowed. Browsers use these same rules and repair things silently. Turn on Develop in your browser or Inspector and see what the browser did to your code to verify this. For example in html5 is it illegal to use the numeric entity for a carriage return: Code:
& # X 000D ; or & # 13 ; Quote:
Technically this is illegal and the well-formed check will barf about it, but happily accept it and replace it with the actual carriage return character (which will become a space). This is exactly what browsers will do as well. As more and more ebook reading software becomes webkit/gecko/blink/ browser based in mobile devices, these things become important. So although the gumbo-based well-formed check is quite picky, it is also quite right about things (the gumbo version Sigil uses has passed the complete html5 testsuite with flying colors) and is safe to turn on. I enable Mend on Open all of the time as a result so that these little nits are fixed, tag mismatches are handled, and etc. Hope this helps, KevinH |
|
![]() |
![]() |
![]() |
#14 |
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)
|
I think the critical reason for me, why gumbo's mending is OK to leave on automatically, is that anything it changes -- even if it is something you didn't want -- will be changed to exactly the way a standards-compliant HTML5 rendering engine would interpret the malformed code anyway.
There is literally no way it can be worse than it was before. And the HTML5 parsing rules are pretty good about making the correct, reasonable call, so it is often the exact same change you would make yourself anyway. Standards -- they're good for you. |
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,361
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Thanks for the vote of Gumbo confidence.
![]() With regards to malformed code, you are literally taking a greater risk by leaving it unchecked than you are by checking it. I know people are still gun-shy from the days of htmlTidy, but it really is true. I would only consider unchecking it if I was opening markup that I was intimately familiar with and 100% certain of. And in that case ... there'd be no reason to turn it off since nothing would get altered anyway. ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Understanding two reported mistakes | roger64 | Editor | 11 | 02-19-2014 02:47 AM |
Manage gramm. mistakes? | Dalirose | Onyx Boox | 1 | 01-01-2014 12:22 PM |
5 Mistakes Of New Fiction Writers | VydorScope | Writers' Corner | 67 | 07-08-2012 07:36 AM |
Noob install mistakes | Shiryas | Calibre | 2 | 04-05-2010 01:30 AM |
Mistakes in The Hobbit | AlexBell | News | 58 | 05-12-2009 08:26 PM |