View Single Post
Old 10-06-2012, 05:21 AM   #118
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,223
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Well formed checks...

From the repeated posts on this subject I think there is still some misunderstandings or thoughts that 0.5.9 has taken a step backwards as far as the well formed checks go compared to say 0.5.3.

As stated previously (meme's post is 100% correct), earlier Sigil versions did *not* let you save invalid xhtml. It just gave you the illusion it was doing so because you turned the option off. All that did was stop nagging you, and meant that it would *automatically* and *silently* make changes itself to your document, which all too frequently could be detrimental resulting in lost content. Behind the scenes, the files written to disk were the result of doing a clean of the xhtml when you hit the Save button.

So turning the check off was quite frankly not a smart idea. Users did it because they were sick of the nagging dialogs interrupting something they intended to come back to. If you forgot to turn it back on, you got no warnings before hitting Save and your document got silently changed. We have removed that block - you can now do those operations like a F&R to fix things, without the risk of forgetting to turn it back on again.

And as meme also stated another clean is done when Sigil loads the ePub. Sigl *needs* valid xhtml at a whole bunch of points in its lifecycle. There are numerous components and features that cannot work unless the xhtml is valid. As I said above the Xerces library that Sigil uses will crash nastily if given invalid xhtml. If it is a choice between Sigil actually staying open and allowing the user to fix their F&R carelessness, versus intermittent and fatal crashes which result in *all* work being lost, it is a no-brainer.

To make Sigil cope with loading epubs containing invalid html (without crashing due to Xerces) is a massive change/amount of work. It may happen one day if someone tackles it though it will involve rewriting a lot of critical Sigil code, a huge amount of testing and quite possibly finding an alternative to the Xerces library. So I wouldn't hold your breath on it, there are much higher priorities for the majority of users imo, such as being able to undo Replace All operations, not throwing away unknown tags/EPUB3/HTML5 support etc.
kiwidude is offline