![]() |
#1 |
Connoisseur
![]() Posts: 59
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 |
![]() |
![]() |
![]() |
#2 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,584
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
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:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() Posts: 59
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. |
![]() |
![]() |
![]() |
#4 |
.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,408
Karma: 5647231
Join Date: Oct 2008
Device: never enough
|
|
![]() |
![]() |
![]() |
#5 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,584
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,408
Karma: 5647231
Join Date: Oct 2008
Device: never enough
|
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,144
Karma: 27110894
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.
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
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. |
![]() |
![]() |
![]() |
#9 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,584
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
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:
|
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
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. |
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,144
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The problem with that concept is that passing epubcheck doesn't guarantee anything at all, other than that the file will pass epubcheck.
|
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,144
Karma: 27110894
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. |
![]() |
![]() |
![]() |
#14 |
Chocolate Grasshopper ...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,599
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , 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). |
![]() |
![]() |
![]() |
#15 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,144
Karma: 27110894
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.
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |