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 02-01-2020, 01:37 AM   #1
rablampain
Junior Member
rablampain began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2019
Device: htc u11 android
epub validator question

I have a 600K HTML5 file with a very large TOC all validating under the W3C HTML validator but the EPUB validator finds errors in the conversion of this file into an EPUB file by Calibre.
The no 4 of the unzipped EPUB file is the first (repeated on every "a tag") to be found incorrect at line 11 by the EPUB validator and I have no idea what the problem could be. This split section of EPUB file in turn does not trigger any error on line no 11 by W3C HTML validator although it complained twice as expected about line no 1.

The error code is:

Error while parsing file: element "a" not allowed here; expected element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg")


And the converted HTML code is:

01 <?xml version='1.0' encoding='utf-8'?>
02 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr" xml:lang="en">
03 <head>
04 <title>My Title Here.</title>
05 <meta name="description" content="My metadata here."/>
06 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
07 <link href="stylesheet.css" rel="stylesheet" type="text/css"/>
08 <link href="page_styles.css" rel="stylesheet" type="text/css"/>
09 </head>
10 <body class="calibre pcalibre">
11 <a id="My_Link_Here" class="pcalibre"><h1 class="pcalibre h1nopba" id="calibre_pb_4">My Link Here<br class="pcalibre calibre3"/>Table Of Content</h1></a>
12 </body></html>


Can anyone suggest what the error is?

Thank you for your help.
rablampain is offline   Reply With Quote
Old 02-01-2020, 05:17 AM   #2
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 4,796
Karma: 16157431
Join Date: Dec 2010
Device: Kindle PW2
You'll need to wrap <a> tags in block level tags. For example:

<h1 class="pcalibre h1nopba" id="calibre_pb_4"><a id="My_Link_Here" class="pcalibre"></a>My Link Here<br class="pcalibre calibre3"/>Table Of Content</h1>
Doitsu is offline   Reply With Quote
Old 02-02-2020, 11:48 AM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 24,600
Karma: 34133293
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(RIP), Galaxy Tab A, Kobo Aura2
Missing Block level tag

But I question the need for an <a> at the top of any file (just after the <body>
Jumping to that file should open at the top all by itself
theducks is offline   Reply With Quote
Old 02-17-2020, 08:46 PM   #4
rablampain
Junior Member
rablampain began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2019
Device: htc u11 android
Thank you, that fixed it.
rablampain 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
Epub:type not allowed in epub validator wDr Editor 0 07-01-2016 10:03 PM
Another EPUB validator? crankypants ePub 6 06-24-2016 04:03 AM
validate with W3C Validator question Capricorn ePub 12 03-09-2016 04:25 PM
Epub Validator bimmy ePub 11 01-09-2014 08:21 AM
epub validator fiona86 Conversion 2 06-24-2011 12:34 PM


All times are GMT -4. The time now is 11:23 PM.


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