Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-18-2012, 08:30 AM   #1
bmacklin
Junior Member
bmacklin began at the beginning.
 
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
bmacklin is offline   Reply With Quote
Old 09-18-2012, 09:28 AM   #2
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 161
Karma: 86115
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.
mzmm is offline   Reply With Quote
Old 09-18-2012, 09:34 AM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,956
Karma: 3363559
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
Toxaris is offline   Reply With Quote
Old 09-18-2012, 07:15 PM   #4
bmacklin
Junior Member
bmacklin began at the beginning.
 
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
bmacklin is offline   Reply With Quote
Old 09-18-2012, 07:26 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,038
Karma: 18147936
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by bmacklin View Post
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>
You should remove the xml:lang="EN" that is not needed and just bloats the code.
JSWolf is offline   Reply With Quote
Old 09-18-2012, 07:55 PM   #6
bmacklin
Junior Member
bmacklin began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2012
Device: ipad
Thank you JSWolf.
bmacklin is offline   Reply With Quote
Old 09-19-2012, 08:21 PM   #7
bmacklin
Junior Member
bmacklin began at the beginning.
 
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">&nbsp;</span></p>

<p class="MsoNormal"><span class="calibre1" xml:lang="EN-US">&nbsp;</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">&nbsp;</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>
bmacklin is offline   Reply With Quote
Old 09-20-2012, 01:53 AM   #8
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,956
Karma: 3363559
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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?
Toxaris is offline   Reply With Quote
Old 09-20-2012, 07:05 AM   #9
bmacklin
Junior Member
bmacklin began at the beginning.
 
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
bmacklin is offline   Reply With Quote
Old 09-20-2012, 07:54 AM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,020
Karma: 40855212
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Toxaris View Post
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?
Quote:
Originally Posted by bmacklin View Post
I'm learning quickly Toxaris.
Learn. THEN clients.

Last edited by DiapDealer; 09-20-2012 at 08:20 AM.
DiapDealer is offline   Reply With Quote
Old 09-20-2012, 12:21 PM   #11
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 9,615
Karma: 5071748
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
Quote:
Originally Posted by bmacklin View Post
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?
It is telling you exactly what it does not like. It is not the contents of the file that it is complaining about, it is the title of the file. References to filename means the name of the file not the contents of the file. It would seem that the file name is actually "16Sept UPDATED_split_000.htm" which has a space in the name. Use Sigil to bring up the ePub and look in the filenames in the left column.

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
DaleDe is offline   Reply With Quote
Old 09-20-2012, 07:22 PM   #12
bmacklin
Junior Member
bmacklin began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2012
Device: ipad
Thank you Dale
bmacklin is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 04:17 AM.


MobileRead.com is a privately owned, operated and funded community.