View Single Post
Old 05-02-2011, 04:17 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by cybmole View Post
the Sony apparently completely ignores lines like <p class="whatever"><br /></p>

IS the epub spec ambiguous, or is Sony e-reader software out of lien with rest of world ?
All I can find is in the HTML 4 spec (which is inherited by XHTML and ePUB):

"User agents should ignore empty P elements."

and previously:

"authors should not rely on user agents to render white space immediately after a start tag or immediately before an end tag"

where "whitespace" means (in XHTML) any of:

SPACE (& #x0020;)
HORIZONTAL TABULATION (&#x0009;)
CARRIAGE RETURN (&#x000D;)
LINE FEED (&#x000A;)

Thus, <p>&nbsp;</p> is not empty, because &nbsp; is not whitespace and it's not ignored. And in my interpretation, <p><br/><p> is not empty either, but it seems the Adobe engine (used by the Sony reader) is removing the <br/> immediately preceding </p> (I think it was mentioned in another thread), so the paragraph becomes empty.

My advice, as expected is to convert all <p><br/><p> into an appropriate class for the following (or previous) paragraph.
Jellby is online now   Reply With Quote