Generating book.epub in rails and validating book.epub in epubcheck tool. I got many errors, fixed everything except following errors:
ERROR: /book.epub/section.xhtml(14,85): attribute "data-align" not allowed here; expected attribute "dir", "id", "lang", "style", "title" or "xml:lang"
ERROR: /book.epub/section.xhtml(15,8): element "br" not allowed here; expected the element end-tag or 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")
If I open and save the file in sigil editor, div or br related errors getting solved. But I want to solve it without opening it in any of the editors.
Below code is the part of xhtml:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>File 1: H1</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="stylesheet.css" type="text/css" rel="stylesheet"/>
<link href="page_styles.css" type="text/css" rel="stylesheet"/>
</head>
<body class="publitory">
<h1 id="File_1_5008715178345834">H1</h1>
<h2 id="File_1_1188526892007714">H2</h2>
<h3 id="File_1_4556759710045751">H3</h3>
<h4 id="File_1_6171405939859093">H4</h4>
<h2 id="File_1_410970362765287">H2</h2>
<p>
<div style="margin: 0px auto; width: 35%;" data-align="Middle" class="image_content">
<img src="bookf779ea3e8163a8345602bc3e0c2ce04d9bffb24d.jpeg" width="100%" alt="Book Content Book Content Book Content Book Content Book Content Book Content Book Content Book Content "/>
<div class="caption" style="clear:both;">Book Content Book Content Book Content Book Content Book Content Book Content Book Content Book Content</div>
</div>
</p>
<p>
<br/>
</p>
<h3 id="File_1_3792181513523657">H3</h3>
</body>
</html>
Help me to solve this. Thanks in advance.
` as a child of `body` when using XHTML 1.1. – Jukka K. Korpela Mar 27 '14 at 09:18
tag to
and that error also solved. data-align attribute error? – user2138489 Mar 27 '14 at 09:32