View Single Post
Old 11-18-2018, 12:44 AM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
nesting divs & spans

I was looking at an epub converted by Calibre.
Cleaning it up I ran epubcheck and found it warning on numerous lines:

Quote:
ERROR(RSC-005): Error while parsing file 'element "div" not allowed here; 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")
That's the "<div class="calibre11">" line below.

Obviously this is awful spaghetti code, but I thought it was at least valid.

Code:
<div class="calibre14">
    <span class="calibre15"> 

    <div class="calibre11">
      <span class="calibre9">ABC<br class="calibre11"/> </span>
    </div>

 DEF 

    </span>
  </div>
Is it invalid to have a div within a span? Sigil's "well formed"check is OK, all readers are OK.
AlanHK is offline   Reply With Quote