|
|
Thread Tools | Search this Thread |
09-18-2012, 08:30 AM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2012
Device: ipad
|
ePub validation error help "attribute border is not declared for element img
Error message in the ePub validator via Sigil is
"attribute border is not declared for element 'img' Here's what the code looks like <p class="MsoNormal"><span class="calibre1" xml:lang="EN"><img alt="" border="0" class="calibre16" src="../Images/image002.jpg" /></span></p> I have 160 images and about the same number of errors such as this. the original doc was in Word, I converted to web filtered, converted via calibre and checked it out on Sigil. Can anyone help me with a solution? cheers Ben |
09-18-2012, 09:28 AM | #2 |
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
the border attribute isn't valid xhtml which is probably why epubcheck is throwing errors. if your images have borders you should be styling them with css, ie
.myclass {border: 1px solid black;} <img class="myclass" src="../images/my_img.jpg"/> and then removing the border attribute in the html. if you're just trying to get rid of the attribute and don't need to worry about styling borders, you can unzip the epub and do a global find/replace on all your html documents, replacing border="0" with an empty 'replace' field. not sure if there's a way to do this in sigil or to control the output to html in word, though. |
Advert | |
|
09-18-2012, 09:34 AM | #3 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You can also just load the filtered HTML directly in Sigil and cleanup there. There will be less mess to clean up then... Calibre does not produce very clean conversions for this.
|
09-18-2012, 07:15 PM | #4 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2012
Device: ipad
|
Thank you both Toxaris and MZMM. You both rock.
But...I'm a really not familiar with HTML or CSS so I'll need a step by step guide. This is what I am hearing from you. Let me know if I have this correct. Firstly, I don't need/want to style any borders on images in the document. That is ...the images do not need any additional border styling. 1. I can load the filtered HTML into Sigil 2. From there I can do a global find/replace 'border "0" with empty 'replace' field. Now I'm not sure I know exactly what an empty 'replace' field is..... Are you just saying replace 'border "0" with the equivalent of nothing...so just deleting it. I'd appreciate some additional clarity. You have given me hope that I just might be able to solve this problem !!! cheers Ben |
09-18-2012, 07:26 PM | #5 | |
Resident Curmudgeon
Posts: 76,028
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Advert | |
|
09-18-2012, 07:55 PM | #6 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2012
Device: ipad
|
Thank you JSWolf.
|
09-19-2012, 08:21 PM | #7 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2012
Device: ipad
|
Filename contains spaces - help
Hello,
I fixed all my problems and Sigil said "no problems". I submitted to Bookbaby and it came back with a bunch of the following messages BK00009767/original/BK00009767.epub/OEBPS/Text/MUTATIONS EBOOK Format16Sept UPDATED_split_000.htm: Filename contains spaces. This error occurs on each split. It doesn't seem like a major problem but not sure how to tackle it. Help? Here is the code for split_000.htm <?xml version="1.0" encoding="utf-8" standalone="no"?> <!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> <meta content="Microsoft Word 14 (filtered)" name="Generator" /> <title>Unknown</title> <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" /> <link href="../Styles/page_styles.css" rel="stylesheet" type="text/css" /> <style type="text/css"> /*<![CDATA[*/ :link { color: blue } :visited { color: purple } p.sgc-1 {font-weight: bold} /*]]>*/ </style> </head> <body class="calibre"> <div class="WordSection"> <p class="MsoNormal"><span class="calibre1"><img alt="" class="calibre2" id="Picture_1" src="../Images/image001.jpg" /></span></p> <p class="MsoNormal"><span class="calibre1" xml:lang="EN-US"> </span></p> <p class="MsoNormal"><span class="calibre1" xml:lang="EN-US"> </span></p> <p class="MsoNormal"><span class="calibre3" xml:lang="EN-US">Presented by</span></p> <p class="MsoNormal"><span class="calibre3" xml:lang="EN-US">Susanne Russo</span></p> <p class="MsoNormal"><span class="calibre3" xml:lang="EN-US"> </span></p> <p class="MsoNormal calibre4 sgc-1"><span class="calibre3" xml:lang="EN-US">Copyright © 2001-2012 Susanne Russo, all rights reserved.</span></p> <p class="MsoNormal"><span class="calibre1" xml:lang="EN-US">No portion of this book may be reproduced or distributed without the permission of Susanne Russo. Feel free to email me:</span> <span class="calibre1" xml:lang="EN-US"><a class="calibre1" href="mailto:cockatiel.mutations%20@gmail.com"><sp an class="calibre1">cockatiel.mutations @gmail.com</span></a></span></p> </div> </body> </html> |
09-20-2012, 01:53 AM | #8 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quick question. The error actually gives you the problem and also the solution. What you did not mention here, is that you create books for clients. Why don't you make sure you know the format and at least basic HTML and CSS?
|
09-20-2012, 07:05 AM | #9 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2012
Device: ipad
|
I'm learning quickly Toxaris. I've been primarily concentrating on text based novels. The most recent book had 160 images. It required a different set of skills and presented some new challenges. That is why I am here asking for assistance.
cheers Ben |
09-20-2012, 07:54 AM | #10 | |
Grand Sorcerer
Posts: 27,960
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Last edited by DiapDealer; 09-20-2012 at 08:20 AM. |
|
09-20-2012, 12:21 PM | #11 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
It is never a good idea to have spaces in any filename that is used in an ePub even though some tools will let you get away with it. Dale |
|
09-20-2012, 07:22 PM | #12 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2012
Device: ipad
|
Thank you Dale
|
11-06-2015, 11:00 AM | #13 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Thanks. Came in useful today! (Found it by Google. Isn't it nice that nothing we ever say is truly lost?)
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
element "img" not allowed in this context | graniton | Calibre | 5 | 05-14-2012 11:39 PM |
ePub validation error: 'element "span" not allowed here' | nannygoats | ePub | 5 | 11-30-2011 08:47 AM |
Help! ePub errors -- attribute link/text not declared | katyya | ePub | 1 | 11-17-2011 02:13 PM |
Validation: attribute 'start' is not declared for element 'ol' | WS64 | Sigil | 4 | 10-06-2011 03:15 AM |
p attribute error on validation | landed | Calibre | 2 | 02-13-2011 11:15 AM |