Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-09-2015, 01:34 PM   #1
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
A bunch of error messages in ePub - help?

Hello,

I've been trying to upload an ebook in Polish to Smashwords (it's a translation of one of my books) and while Smashwords does include Polish as a language, I get these error messages:

Quote:
attribute "align" not allowed here; expected attribute "class", "dir", "id", "lang", "style", "title" or "xml:lang" (repeats 18 times)

attribute "name" not allowed here; expected attribute "accesskey", "charset", "class", "coords", "dir", "href", "hreflang", "id", "lang", "rel", "rev", "shape", "style", "tabindex", "target", "title", "type" or "xml:lang" (repeats 2 times)

element "metadata" incomplete; missing required elements "dc:language" and "dc:title"

element "u" not allowed anywhere; expected the element end-tag, text or element "a", "abbr", "acronym", "applet", "b", "bdo", "big", "br", "cite", "code", "del", "dfn", "em", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "tt" or "var" (with xmlns:ns="http://www.w3.org/2000/svg") (repeats 2 times)
What a mess! Can anyone help me make sense of those?

Grateful for any help.

Thanks!

Alda
Alda is offline   Reply With Quote
Old 02-09-2015, 01:44 PM   #2
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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
This should belong more in the ePUB subforum, since this is not a Sigil question...

Are you uploading an ePUB to Smashwords or use their Meatgrinder? If the first, check and repair your ePUB first. I don't know how this book was created, but it is done by someone not knowing a lot about e-books/ePUB...
For ePUB certain metadata is mandatory, like he language and title. So, this must be entered in the ePUB. Easiest to do this, is via an editor like Sigil. Most of them have a metadata editor to fix this.
Another thing is that there is a difference between HTML and XHTML. It seems that here HTML is used instead of XHTML. In XHTML 'name' is not allowed for anchors, it must be 'id'. More or less the same probably with the 'align'-error. The last error seems to be that an illegal tag is used for an SVG. Not sure without more information.

Run the ePUB through the validation in Sigil and ePUBcheck for more useful error messages and locations where these errors occur.
Toxaris is offline   Reply With Quote
Advert
Old 02-09-2015, 05:05 PM   #3
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
Hi Toxaris and thanks for the reply.

My apologies for posting those ... the book was created in Sigil actually but since the Sigil error messages wouldn't copy (and paste) I stupidly and incorrectly assumed that what Smashwords had sent me was the same as the Sigil messages only formulated differently. Just goes to show that I shouldn't assume!

OK, the Sigil messages are as follows:

Quote:
The <language> element is missing

The <title> element is missing

attribute 'name' is not declared for element 'a'

attribute 'align' is not declared for element 'p' (there are several of those)

no declaration found for element 'u'

element 'u' is not allowed for content model (and now comes a long, long string of words/letters such as a|br|span|bdo|map .......)
Can you help me make sense of those?
Alda is offline   Reply With Quote
Old 02-09-2015, 05:31 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Yeah, it says the language and title elements of the metadata are missing, that "u" is not allowed for a list of tags, including, you will find, svg, and that "name" is not valid for the "a" tag and "align" is not valid for the "p" tag.

You should be able to follow those error messages (I believe by double-clicking them) to the place the error appears.
eschwartz is offline   Reply With Quote
Old 02-10-2015, 01:51 AM   #5
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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Just replace 'name' by 'id' in the anchor tags and that is one problem solved already. Alignment should not be done directly on a paragraph tag, but best via a stylesheet. If that is not possible or desirable, you can put it in a style attribute.
Toxaris is offline   Reply With Quote
Advert
Old 02-10-2015, 10:13 AM   #6
DomesticExtremis
Addict
DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.
 
DomesticExtremis's Avatar
 
Posts: 243
Karma: 359054
Join Date: Nov 2012
Device: default
Just guessing, but it seems that the HTML is v4.0 -
a lot of those errors are for html4 deprecated items.

ePUB needs html5 - or strictly speaking XHTML which
has a reduced tag set and stricter rules about grammar and syntax.
DomesticExtremis is offline   Reply With Quote
Old 02-10-2015, 11:55 AM   #7
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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by DomesticExtremis View Post
Just guessing, but it seems that the HTML is v4.0 -
a lot of those errors are for html4 deprecated items.

ePUB needs html5 - or strictly speaking XHTML which
has a reduced tag set and stricter rules about grammar and syntax.
No, just no. It depends on the ePUB version and ePUB2 is based on XHTML1.1 which is based on HTML4.01. ePUB3 uses HTML5. There are just differences between XHTML and HTML.

Last edited by Toxaris; 02-10-2015 at 12:29 PM.
Toxaris is offline   Reply With Quote
Old 02-10-2015, 12:01 PM   #8
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
Thank you all for the replies.

I've replaced "name" by "id" so that's ok, and I've added the "title" metadata.

As for the <language> metadata ... this book is written in Polish. When I look at another of my books written in english, the tag looks like this

Quote:
<dc:language>en-US</dc:language>
Could anyone give me the comparable abbreviation for Polish, or point me in the direction where I can find it?

Quote:
Alignment should not be done directly on a paragraph tag, but best via a stylesheet. If that is not possible or desirable, you can put it in a style attribute.
Ok, I'm a bit of a novice (learning fast though) so I'm not sure what you mean Toxaris. Can you give me the specific code I should add to the stylesheet? I should mention that I've used the stylesheet that I use for my other books, and they have passed without a hitch, i.e. no error message. So I'm not sure of the problem with this.

Also, I'm still left with these two messages:

Quote:
no declaration found for element 'u'

element 'u' is not allowed for content model (and now comes a long, long string of words/letters such as a|br|span|bdo|map .......)
When I click on the message, I see this code in the file:

Quote:
<u><span style="font-size: 13.5pt;" xml:lang="EN-GB">Zastrzeżenie:</span></u>
Can anyone make sense of that?

Finally:

Quote:
Just guessing, but it seems that the HTML is v4.0 -
a lot of those errors are for html4 deprecated items.

ePUB needs html5 - or strictly speaking XHTML which
has a reduced tag set and stricter rules about grammar and syntax.
Do you mean that the Sigil I'm using is out of date? I confess I haven't updated in a while.

Thanks again for all the help!
Alda is offline   Reply With Quote
Old 02-10-2015, 12:31 PM   #9
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
<u> for underlining is deprecated, remove that tag and style it with CSS, for text-decoration I believe.

Sigil was updated extremely recently but it was primarily bugfixes, not a radical change in interpreting ebooks. I would still encourage you to update...
eschwartz is offline   Reply With Quote
Old 02-10-2015, 12:46 PM   #10
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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by Alda View Post
Thank you all for the replies.

I've replaced "name" by "id" so that's ok, and I've added the "title" metadata.

As for the <language> metadata ... this book is written in Polish. When I look at another of my books written in english, the tag looks like this



Could anyone give me the comparable abbreviation for Polish, or point me in the direction where I can find it?
Polish is just pl.

Quote:
Originally Posted by Alda View Post
Ok, I'm a bit of a novice (learning fast though) so I'm not sure what you mean Toxaris. Can you give me the specific code I should add to the stylesheet? I should mention that I've used the stylesheet that I use for my other books, and they have passed without a hitch, i.e. no error message. So I'm not sure of the problem with this.
It really depends on the actual error in the code. It seems that styling is done directly in some tags. Usually that can be done better in the stylesheet. I strongly recommend to read the tutorial on the wiki. It will help you to get up to speed and is a quick read.

Quote:
Originally Posted by Alda View Post
Also, I'm still left with these two messages:



When I click on the message, I see this code in the file:



Can anyone make sense of that?
The <u> tag is not part of the XHTML specs. It might be that it will work, but it is not mandatory. It is safer to use a style in the stylesheet with the attribute 'text-decoration: underline;' and apply that to the text.
Quote:
Originally Posted by Alda View Post
Do you mean that the Sigil I'm using is out of date? I confess I haven't updated in a while.
No, not per se. Sigil is an ePUB2 editor and HTML5 is not part of ePUB2. The base of ePUB3 is HTML5, however ePUB3 cannot be read on most readers or reading devices. Acceptance is low, so if you do not need it, don't use it.
The latest Sigil version is 0.8.4. It is in transition to ePUB3, but it will take a while. With a plugin, Sigil can export to the ePUB3 format though.
Toxaris is offline   Reply With Quote
Old 02-11-2015, 12:22 PM   #11
DomesticExtremis
Addict
DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.
 
DomesticExtremis's Avatar
 
Posts: 243
Karma: 359054
Join Date: Nov 2012
Device: default
Quote:
Originally Posted by Toxaris View Post
No, just no. It depends on the ePUB version and ePUB2 is based on XHTML1.1 which is based on HTML4.01. ePUB3 uses HTML5. There are just differences between XHTML and HTML.
Well, yes and no.

Much of what is excluded from html 4 by xhtml 1.1 is also deprecated
by html5.

So yes epub2 is xhtml based, with its extended grammar and syntax, but
just sucking an html4 web source will likely cause lots of errors of the
kind noted above.
DomesticExtremis is offline   Reply With Quote
Old 02-12-2015, 07:12 AM   #12
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
Quote:
I strongly recommend to read the tutorial on the wiki. It will help you to get up to speed and is a quick read.
Thank you so much for that link Toxaris - very useful! I feel enlightened.

And ... well, I'm embarrassed to say this but I figured out that the problems above were largely caused by a glaring oversight on my part. When I imported the body of the book into Sigil I used the word2cleanhtml tool ... but when I went to add the title and disclaimer page I forgot and simply pasted Word into Sigil. Hence the barrage of errors.

Thank you all for your help on this though, and as I said above, I am much the wiser and will be referring to that Wiki often.

Alda
Alda is offline   Reply With Quote
Old 02-12-2015, 09:29 AM   #13
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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
If you want a clean HTML file from Word, I strongly recommend my tools. Not only it can create a clean HTML file, but even directly an ePUB from Word.
Toxaris is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Messages in Calibre didiyy Devices 17 01-11-2013 03:31 PM
Trying to understand error messages GraciousMe Sigil 13 10-29-2012 08:38 AM
ePub Error Messages and How to Fix LPDPress ePub 7 05-11-2012 11:59 AM
newbie's epub error messages americamba ePub 11 03-10-2012 11:51 AM
error messages on new PC huskerruth Devices 1 02-16-2011 11:56 AM


All times are GMT -4. The time now is 01:56 PM.


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