05-15-2012, 12:54 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2012
Device: various
|
Problem with Sigil Validation
Hi all - I have a little experience and have written an E-book in HTML and turned it into an Epub with Calibre. However I got an enormous amount of errors in running it through Epubchecker which were all to do with my images which are in SVG format.
I then saw a post here about the Sigil validator and got it to open my HTML file and ran the validator. The only problem I am getting is also with my images but not the same as through calibre which all seemed to have to do with the xml coding going on under the bonnet of SVG images. The problem I encountered with Sigil's validation was that I show the width of my images (mostly svg but dome gif and jpegs) as: width="100%" and height="auto". But the validators describes the height expression as: facet value 'auto' does not match regular expression facet '[-+]?(\d+|\d+(\.\d+)?%)' I changed width to 100% but of course that stretched the picture. I did a wee biy of checking and it seems that expression must be in % or pixels but there are several hundred images and they are all different sizes and I don't really fancy going through them individually and enter the sizes. So I wondered if there was an easy way Oh I should add that the actual "width" and "height" sizes don't actually affect the appearance of the images on screen as they are all wrapped in div tags for altering alignment and width and of course the width represents a percentage of the screen width and not the image width so I also am thinking that perhaps the width and height aren't strictly necessary. Sorry this is so long but I wanted to try and cover all the bases - I hope someone can help and give thanks in advance. |
05-15-2012, 12:56 PM | #2 |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2012
Device: various
|
Error in previous post
I stated: "I changed width to 100%" should of course have been: "I changed height to 100% |
Advert | |
|
05-15-2012, 01:30 PM | #3 | |
Jr. - Junior Member
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
|
Quote:
I just updated Calibre to V8-51 and did an epub to epub conversion and Calibre gave each of my illustrations a unique label where the label was defined as: height: (X)px; width: (X)px;. Apparently Calibre went to each image file , found the dimensions and plugged them in. I had started with a "class="photo"" where height and width of "photo" where were defined as "auto" inside the <img> tag. Regards - John |
|
05-16-2012, 04:27 AM | #4 |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2012
Device: various
|
Hi and thanks Jabby for your help. I updated my Calibre to the latest - all image files had auto height and width of 100% - then validated that in Sigil and the errors didn't appear on validation. I then had Sigil upload the same html file as Calibre and saved as an Epub and validated that and every image failed on the "auto" expression.
So I think you are right that Calibre must change the height width expression of "auto" to one that is accepted as a "regular expression facet". Might be worth incorporating this in a future Sigil update. Although I still have my probs with both Sigil and Calibre generated Epubs where every SVG image has a series of xml problems on Epubchecker but not on Flight crew - there's no probs with gifs or jpegs so I've saved one of the svg images as a png and will rerun the Epubcheck validation to see what happens to the png saved file. But I'm not sure if this should be on this topic or elsewhere so forgive if I have strayed a little and once again thanks to Jabby for his helpful response. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
validation problem with Sigil | gpc127 | ePub | 4 | 05-12-2012 07:08 AM |
named anchors fail validation in sigil | lkasdorf | Sigil | 2 | 04-20-2012 10:55 PM |
Need help with Sigil validation error | wraylewis | Sigil | 8 | 12-21-2011 02:46 PM |
ePub Validation Fail after Sigil edit | dm1839 | Sigil | 7 | 10-16-2011 07:59 PM |
Sigil epub validation | sassanik | Sigil | 0 | 01-25-2011 11:58 AM |