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 11-13-2009, 06:59 AM   #1
georg3200
Connoisseur
georg3200 began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Nov 2008
Device: none
tag <br /> causes epubeck error: attribute clear not allowed

When I check a epub with epubcheck (1.0.3 or 1.04) I always get an error:

"attribute "clear" not allowed at this point: ignored"

I tried the br tag in different versions <br/> or <br /> or <br></br>
I always get the error with the attribute clear. None of my br-tags contains an attribute clear or any other attribute.

It seems that the epub itself works without any problems in ADE, on a Sony PRS 505 and a Bookeen Opus. The br-tag works fine.
But our customers use ebupcheck to control the books we deliver. They only accept error-free books.

Usually I replace the br-tag with a new paragraph, but sometimes thats a lot of work with the stylesheet

Does anyone know, what I can do or what the problem is?

thanks
georg
georg3200 is offline   Reply With Quote
Old 11-13-2009, 07:07 AM   #2
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,851
Karma: 88206086
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Could it be something in your CSS?

<br /> is allowed in ePubs.

To prove it, here's a tiny ePub that has a <br /> in it, and passes epubcheck 1.04


Quote:
Originally Posted by georg3200 View Post
When I check a epub with epubcheck (1.0.3 or 1.04) I always get an error:

"attribute "clear" not allowed at this point: ignored"

I tried the br tag in different versions <br/> or <br /> or <br></br>
I always get the error with the attribute clear. None of my br-tags contains an attribute clear or any other attribute.

It seems that the epub itself works without any problems in ADE, on a Sony PRS 505 and a Bookeen Opus. The br-tag works fine.
But our customers use ebupcheck to control the books we deliver. They only accept error-free books.

Usually I replace the br-tag with a new paragraph, but sometimes thats a lot of work with the stylesheet

Does anyone know, what I can do or what the problem is?
Attached Files
File Type: epub Line Break Test.epub (1.8 KB, 177 views)
pdurrant is online now   Reply With Quote
Old 11-13-2009, 08:32 AM   #3
georg3200
Connoisseur
georg3200 began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Nov 2008
Device: none
Indeed your example works without any errors.

I will take a closer look at the stylesheets we are using.

Thanks for the tip.
georg3200 is offline   Reply With Quote
Old 11-13-2009, 01:00 PM   #4
kjk
.
kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.
 
Posts: 3,408
Karma: 5647231
Join Date: Oct 2008
Device: never enough
Quote:
Originally Posted by georg3200 View Post
But our customers use ebupcheck to control the books we deliver. They only accept error-free books.
They are using epubcheck to ensure error-free books?
kjk is offline   Reply With Quote
Old 11-13-2009, 04:43 PM   #5
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,851
Karma: 88206086
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by kjk View Post
They are using epubcheck to ensure error-free books?
Perhaps it would be fairer to say that they're using epubcheck to ensure that they don't accept books with known errors?

I don't know of any way to ensure error-free books.
pdurrant is online now   Reply With Quote
Old 11-13-2009, 05:25 PM   #6
kjk
.
kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.
 
Posts: 3,408
Karma: 5647231
Join Date: Oct 2008
Device: never enough
Quote:
Originally Posted by pdurrant View Post
Perhaps it would be fairer to say that they're using epubcheck to ensure that they don't accept books with known errors?

I don't know of any way to ensure error-free books.
darn, I was hoping maybe there was a new version of ePubcheck out there
kjk is offline   Reply With Quote
Old 11-13-2009, 05:38 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,984
Karma: 5036765
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Even fairer to say they're using epubcheck to ensure they have books that pass epubcheck.
kovidgoyal is offline   Reply With Quote
Old 11-15-2009, 09:31 AM   #8
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
It's nothing to do with your css.
You're using the transitional xhtml spec in your doctype:
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'

Change that to
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'
and the errors should go away

For instance, here's Pauls example ePub in which the only thing that's changed is the xhtml spec in the doctype. It now produces errors in epubcheck.
Attached Files
File Type: epub Line Break Test.epub (2.0 KB, 145 views)
charleski is offline   Reply With Quote
Old 11-15-2009, 12:58 PM   #9
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,851
Karma: 88206086
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
How interesting.

The transitional XHTML 1.0 DTD has the br element with a default attribute of clear:none

The strict XHTML 1.0 DTD has the br element with no default attributes.

Double-checking the ePub specs, it seems we ought to be using the XHTML 1.1 DTD instead. And in that br has no default attributes.

So I think that epubcheck was right!

Quote:
Originally Posted by charleski View Post
It's nothing to do with your css.
You're using the transitional xhtml spec in your doctype:
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'

Change that to
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'
and the errors should go away

For instance, here's Pauls example ePub in which the only thing that's changed is the xhtml spec in the doctype. It now produces errors in epubcheck.
pdurrant is online now   Reply With Quote
Old 11-15-2009, 01:48 PM   #10
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
Yes, you're right. The doctype should really be
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
(and the content should be valid xhtml 1.1) to avoid any problems.

I must admit I'm still a little confused about all this DTD stuff (I'm no expert). The IDPF specs spend some time talking about backwards compatibility, which suggests that it should be possible to use older specs, though any new document should be using the current one, of course.

Making sure that ePubs pass epubcheck is very sensible for publishers. They want a file that they can archive away and won't have to spend time and money to fix because it doesn't render correctly on a new ereader a few years down the road.
charleski is offline   Reply With Quote
Old 11-15-2009, 02:17 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,984
Karma: 5036765
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by charleski View Post
Making sure that ePubs pass epubcheck is very sensible for publishers. They want a file that they can archive away and won't have to spend time and money to fix because it doesn't render correctly on a new ereader a few years down the road.
The problem with that concept is that passing epubcheck doesn't guarantee anything at all, other than that the file will pass epubcheck.
kovidgoyal is offline   Reply With Quote
Old 11-15-2009, 09:00 PM   #12
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by kovidgoyal View Post
The problem with that concept is that passing epubcheck doesn't guarantee anything at all, other than that the file will pass epubcheck.
You can spend decades studying astronomy, but it doesn't mean you'll be able to guarantee with complete certainty that the sun will come up tomorrow.

It guarantees it's free of the errors for which epubcheck checks. Any problems with epubcheck are largely problems with the standard itself (though I'm sure it has some real bugs still).

It would simply be silly not to demand that epubs pass epubcheck if you're in the business of commissioning documents that will be archived.
charleski is offline   Reply With Quote
Old 11-15-2009, 09:45 PM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,984
Karma: 5036765
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Umm no, the major problem with epubcheck is that all it checks for is the conformance of epub with various DTDs. In the real world, conformance with DTD's is by far the least important of all checks you could possibly perform. The only reason that epubcheck exists at all is that it is trivial to code.

And yet, the existence of epubcheck convinces endless scads of people that their epubs are going to work as they intended, just because they pass epubcheck. I would have been so much happier if trivial had been prepended to epubcheck. But then no one would use it and then how are we to give people a warm and fuzzy feeling that their epubs are A OK and going to work forever.
kovidgoyal is offline   Reply With Quote
Old 11-17-2009, 05:51 AM   #14
GeoffC
Chocolate Grasshopper ...
GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.
 
GeoffC's Avatar
 
Posts: 26,938
Karma: 16968764
Join Date: Mar 2008
Location: Scotland
Device: Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
..... I've had plenty of annoying experience of epubcheck saying an ebook was good with no errors or warnings, but it looks good in firefox and ie - but then ADE insists "errors may cause this book to display incorrectly".
maybe the best way is to have one of each device that accepts epub and use those as the decider? (though whether each device itself follows the standard is another matter entirely).
GeoffC is offline   Reply With Quote
Old 11-17-2009, 09:13 AM   #15
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,984
Karma: 5036765
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I usually advise people to get hold off at least one epub displaying device and check their files on that. It's no guarantee of anything other than that your files will display on that device, but IMO if your file displays on one device the chances that it will display on others are much higher than if it passes epubcheck.
kovidgoyal 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
attribute "scheme" from namespace error in epubcheck 1.0.5 thunderune ePub 15 06-30-2011 10:57 AM
Possible bug in 7.4 Tag Editor error FizzyWater Calibre 3 06-20-2010 06:11 AM
Error parsing attribute name? seagull Calibre 1 01-01-2010 11:30 AM
Attribute error? jusmee Calibre 2 12-15-2009 08:22 PM
'BookList' object has no attribute 'add_books' Error message nomedia Calibre 4 09-29-2008 01:50 AM


All times are GMT -4. The time now is 10:00 AM.


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