0

我从 epubcheck 得到一些似乎没有意义的输出。我不明白错误消息的含义,希望其他人可以提供帮助。

epubcheck 的输出是:

Epubcheck Version 3.0b4

Validating against EPUB version 2.0
ERROR: /path/to/my/book.epub/sub_html_file.html(134,117): text not allowed here; expected element "td" or "th"

然后还有数百条其他消息。有问题的文件的第 134 行看起来像

<hr class="calibre29"/>
<table border="0" cellpadding="0" cellspacing="0" class="calibre53">
   <tr class="calibre56"> 1
     <td class="calibre55" valign="top">
      <p class="calibre30"><span class="calibre21"><strong class="calibre8">Person(s)</strong></span></p>
      </td>

让我感到困惑的是该行的第 117 位开始td,这就是epubcheck它所要求的。

4

1 回答 1

2

这是一个简单的 XHTML 验证错误。如果您查看您的 HTML(我已经稍微重新格式化了它),您将看到您的<tr>元素包含文本以及元素内容。这是不允许的。的内容模型<tr>仅包含<th>and <td>,没有其他内容。

您需要将该“1”包装在一个元素中。

于 2012-05-22T16:04:15.303 回答