04-23-2017, 02:33 AM | #1 |
Wizard
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Servlet not configured properly
can someone explain this error message
I have a epub which give this message for the validate stylesheets... tool the well formed... f7 check says all OK the book styles look ok by eye. But if i do my usual clean up routine of an epub to epub conversion in calibre, then sigil will not open the output file from that. I can see it running in talk manager, but i never get the output window. Sigil will happily open the original file here is the offending stylesheet: Spoiler:
Last edited by theducks; 04-23-2017 at 10:51 AM. Reason: wrap long in spoiler |
04-23-2017, 03:27 AM | #2 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
The CSS you posted is fine. Something different has to be occurring between the Original -> Calibre conversion.
Mind sharing the Original/Broken EPUBs? |
Advert | |
|
04-23-2017, 03:57 AM | #3 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
@stumped: I also got the same W3C CSS Validator error message with Sigil 0.9.8 and the following (valid) minimal CSS file.
Code:
p { text-indent : 0em; } a { text-decoration : none; color : inherit; } Until this is sorted out try the following:
|
04-23-2017, 04:05 AM | #4 |
Wizard
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Yes,it seems that any epub I check gives the servlet message.
maybe I don't have java installed nowadays. Also, I see that the validate tries to run in edge, though my default browser is chrome. As for the problem book, I gave up trying to figure why it would not open after conversion. Other books are fine so my sigil and calibre installs are both ok, i reckon. I discovered that I had a mobi version anyway, and that opens ok after converting it to epub. |
04-23-2017, 04:16 AM | #5 | ||
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
You don't need Java to check your CSS file. Java is only required to run epubcheck on your machine.
Quote:
Quote:
|
||
Advert | |
|
04-23-2017, 07:29 AM | #6 |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm seeing sporadic success/failure this morning (with Firefox on Windows), so I assume it's a W3C issue. I'll wait a while to see if the situation improves before investigating too deeply.
I've never been a fan of hardcoding this sort of external internet dependence into a program anyway. It's way too fragile when the website in question is not under your control. I had a temporary CSS3 validation plugin that did much the same thing (before Sigil included the CSS2/2.1/3 preference setting). Perhaps I should dust it off and make it full featured, so that we can remove the fragile functionality from Sigil itself. That way if something goes wonky, you release a new plugin instead of invalidating features of previous versions of Sigil (moving forward). |
04-23-2017, 06:06 PM | #7 | |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Might I ask what benefit is gained by taking a fully compliant ePub from Sigil and running it through an ePub->ePub conversion in Calibre? |
|
04-23-2017, 06:42 PM | #8 |
null operator (he/him)
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
04-24-2017, 01:01 AM | #9 | |
Wizard
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Quote:
some books have what looks like a bloated, put in everything and the kitchen sink sort of css and for what I typically want to do : tweak line heights, line spacing, text margins, the calibre-ised one is easier to work with. or at the opposite stream there may be bare <p> styles with no class. calibre will insert a class for me which I can then tweak also calibre adds in my preferred extra css which saves me going it manually ; thats for justification, hyphenation, widows, orphans, and it standardises page margins and it creates an original format fallback position, which I can restore from if I then proceed to mess up an edit. that gets removed only when I am fully satisfied so seeing both formats in the library signals to me that I have a tweak in progress or about to start. Last edited by stumped; 04-24-2017 at 01:05 AM. |
|
04-24-2017, 05:36 AM | #10 | |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
I can see what you are trying to do. May I make a few points that you (or others reading) may not be aware of? - It is possible to save a standard CSS file which can be imported to any epub. Just right-click on an existing css sheet and select "save as". After adding the file to a new ePub, right-click on your html file and select "link stylesheets". This allows you to have your css exactly how you want it - and with named classes instead of numbered so you can intuitively figure out what styling is being applied. You can edit your html without referencing which "number" does what styling. <p class="sectionbrk"> vs <p class="calibre42"> - Once you are done editing you can select "tools/delete unused stylesheet classes" to remove any excess css styles - no bloat. - It is not required, or even a good idea IMO, to put a class name next to a standard element eg. <p class="normalparagraph"> or <body class="calibre">. You can simply style the normal element using the base tag. That makes it so much easier to determine when there are abnormal styling applied to a specific element and leaves a normal paragraph (98% of the book) uncluttered. For example: Spoiler:
- I completely understand having a fallback file. I always "save early, save often" using the "save-as" function. Using that method you can have multiple save points in your saved editing folder. Of course, these are all techniques. Take 'em or leave 'em. I was just wondering if there was something that Calibre does to create a more compliant ePub that I wasn't aware of. Cheers! |
|
04-24-2017, 08:10 AM | #11 |
Wizard
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
I get what you say, but for me it's all about familiarity.
if I were writing my own books then having a standard style sheet would make sense, but all I do is tweak to suit my own reading preferences for novels: which other folks are welcome to hate fully justified, no hyphens, no widows or orphans, no dropcaps, and no acres of wasted space around chapter headings. Calibre conversion does a lot of that via the extra CSS inputs and filters, then a couple of regexes take out fixed line heights and <a tags, a quick zap of fonts I don't like, set the text indent to 1.5em and I'm about done. probably take less than a minute to prep new book for reading with that. I also zap dedications to people I don't know & will never meet, epigrams intended to show how much better read that author is than I am, and trailers for other books in the series layout. i finish off with a quick modify-epub plugin run to fix up the TOC and a page count plug-in run for the pages that I am actually going to read. Once I have read it, I can delete the original format backup also. I hate reading bought-from-amazon books in their original format and via the kindle app because I cannot suppress hyphens and I cannot customise page turn tap zones. |
04-24-2017, 11:57 AM | #12 |
Wizard
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
ps - going back to post#1 and the misbehaving book:
looking at it again., it styled every body text paragraph with <p class="chapter">... i think this triggered calibre's chapter detection so the conversion became a book with about 5000 chapters ( the conversion ran for ages) and then sigil choked on the result and could not open it. is there an upper limit on how many chapters ( Xhtml files) sigil can handle within one book ? just a theory but yes, re-converting with the xpath chapter detection defaults removed in calibre, sigil is happy to open the output, and the conversion went much faster. I should have spotted that at the time, as it's not the first book I've edited where having a class called "chapter", not being used on a 1 per chapter basis, has caused conversion problems. in past encouters though, the "chapte"r style has been used on the chapter header, so the only side effect was to put headers onto their own "page", with the associated body text on the next "page" Last edited by stumped; 04-24-2017 at 12:05 PM. |
04-24-2017, 12:50 PM | #13 |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Your theory is spot on.
You can: disable the detection of the word Chapter, in Calibre conversion or search and Replace <p class="chapter">. with <p class="para">. (or any other selection that does not colide with the detection rules) Notice I used the complete tag to avoid other, unwanted changes. You may need to check for <p tags that include other things (id, style?) as well) |
04-24-2017, 12:55 PM | #14 |
Wizard
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Yes thanks, I tested by removing the default xpath thing in calibre, less hassle than changing the class name everywhere.
cross with myself for not spotting this as a probable cause. How many "chapters" is sigil designed to cope with, or is that a how much ram do you have thing. I have 8gb |
04-24-2017, 01:04 PM | #15 | |
Well trained by Cats
Posts: 29,807
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:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can the software be configured to automatically end old threads? | mrmikel | Feedback | 11 | 01-16-2014 01:27 PM |
Stop Calibre from scanning a device before it can be configured? | taosaur | Devices | 9 | 09-27-2013 04:23 PM |
problems accessing calibre-server with proxy configured | SirMossi | Library Management | 5 | 09-26-2013 07:37 AM |
Configured Transformer Ft101 error | beckywc | Calibre | 2 | 09-22-2012 10:31 PM |
Cover/metadata retrieval when ISBN is un-configured | ldolse | Development | 12 | 11-05-2011 10:07 PM |