09-30-2024, 04:08 PM | #16 | |
Grand Sorcerer
Posts: 28,036
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
09-30-2024, 04:11 PM | #17 |
Guru
Posts: 781
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
|
Of course, after your last PR.
|
09-30-2024, 04:45 PM | #18 | |
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
Quote:
The fragments I looked at were all footnote links in the text body linking to a reference at the end of the chapter. Only one footnote/chapter. The footnote had a return link to the text. These fragments had all worked fine for years and had never been flagged as undefined by Epubcheck over multiple checks. As soon as the quotes error was corrected, the next Epubcheck was completely clean with no reference to any fragments in any chapter. I haven't understood the possible connections between a single missing or mismatched quote and unidentified fragments elsewhere. It seems a most unlikely scenario. |
|
09-30-2024, 05:32 PM | #19 |
Guru
Posts: 781
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
|
The connection is simple.
Parsing encounters erroneous incompatible quotes, which results in the inability to check the rest of the text where the footnote text is located, hence the message about the unidentified fragments. Incompatible quotes are dangerous and I don't understand where they would come from in Sigil, which takes great care to ensure that the code is well-formed. You simply have to be careful when editing your code to avoid such situations. Here is another example of a file that, when you run the "Mend" option, causes the contents to be cleared. 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>Test</title> </head> <body> <div class='badclass"> <h1>Chapter</h1> <p class="first">Blah</p> <p>Blah<a id="fn1" href="#fntext">[1]</a></p> <div class="footnotes"> <div class="footnote"> <p><a id="fntext" href="#fn1">[1]</a> Footnote 1</p> </div> </div> </div> </body> </html> |
10-01-2024, 02:07 AM | #20 |
Bibliophagist
Posts: 40,383
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For what it may be worth, I edited sanitycheck.py to include DiapDealer's and BeckyEbook changes and it seemed to catch all the missing/mismatched quotes I threw at it.
|
10-01-2024, 05:45 AM | #21 | |
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
Quote:
Of course these errors come from editing and my concern is with author friends learning to use Sigil. I wouldn't advise them to use Mend and Prettify to correct for an accidentally erased quote. They wouldn't understand the result. Further checking of my quotes and missing angle brackets cases found that all resulting fragment errors were down to nav links in that xhtml file and their correspondents in the HTML Contents and NCX files. Since my test document was a non-fiction epub with h1, h2, h3 levels of contents, that explained the number of fragment problems. Your comment about the parsing encountering an error and being unable to check the rest of the file explains all. Perhaps it would be better to ignore the rest of the file or just the links, once an error has been encountered rather than listing 'errors' that do not or may not exist. In any case, we have to rerun the plugin after fixing the real error and if there are really unidentified fragments they could be listed in a subsequent run. Last edited by philja; 10-01-2024 at 06:14 AM. |
|
10-01-2024, 06:24 PM | #22 |
Bibliophagist
Posts: 40,383
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Hmmm... ran into one ebook today where the modified sanity check throws an error. The line reads:
Code:
<p class="center"><a href="https://alsoby.me/r/amazon/B07BZM62LQ?fc=us&ds=1"><span class="underline">THE UNBELIEVABLE MR. BROWNSTONE</span></a></p> Edit: Also add this line as one that triggers an error message from sanity check: Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> Last edited by DNSB; 10-01-2024 at 07:01 PM. |
10-01-2024, 07:53 PM | #23 |
Grand Sorcerer
Posts: 28,036
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I think that's my fault. I copied a bit too much from xmlsanitycheck.py.
|
10-01-2024, 07:55 PM | #24 |
Grand Sorcerer
Posts: 28,036
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Try this one: my fixed changes with Becky's addition included.
|
10-01-2024, 09:25 PM | #25 |
Bibliophagist
Posts: 40,383
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
A quick test against a couple of files that were triggering the errors went well with no errors reported.
|
10-01-2024, 09:33 PM | #26 |
Grand Sorcerer
Posts: 28,036
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Thanks for getting back. I think I'm going to let this stew a bit to allow for more testing. I don't want to end up just kicking the can further down the road.
|
10-03-2024, 05:47 PM | #27 | |
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
Quote:
To try your sanitycheck.py file, I suppose I need to swap it with the file that is in the source and then rebuild. Is that a correct assumption? |
|
10-03-2024, 05:50 PM | #28 | |
Bibliophagist
Posts: 40,383
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
10-03-2024, 06:11 PM | #29 |
Grand Sorcerer
Posts: 28,036
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
David is correct. No rebuild required. If you built Sigil using the default install prefix, sanitycheck.py will be installed in /usr/local/share/sigil/python3lib/
Last edited by DiapDealer; 10-03-2024 at 06:15 PM. |
10-04-2024, 09:11 AM | #30 | |
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil Font use without error messages | qkiazd | Sigil | 16 | 11-18-2023 11:04 AM |
Copying error messages | AlanHK | Sigil | 1 | 09-27-2017 02:07 PM |
About translation and error messages | hermida | Development | 12 | 05-05-2016 04:34 PM |
What's with the DRM error messages? | AndyElk | Calibre | 3 | 02-28-2016 08:14 PM |
error messages on new PC | huskerruth | Devices | 1 | 02-16-2011 11:56 AM |