rousse101 / epubcheck

Automatically exported from code.google.com/p/epubcheck
MIT License
1 stars 0 forks source link

"The a element must not appear inside a elements" not detected for an EPUB2 file #287

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
PROBLEM:

Error found by the W3C Markup Validation Service but not detected by EpubCheck 
for an EPUB2 (detected for an EPUB3). This is about an a element as a 
descendant of another a element.

METHOD:

Here is an example:

<span class="hyperlink" id="fn18">
<a class="external" href="http://idpf.org">consectetur adipisicing elit<a 
class="footnote" href="content2.xhtml#fnt18"><sup>[18]</sup></a>,</a>
</span>

RESULT:

Epubcheck validates the EPUB2 attached file, but not the EPUB3 attached file, 
with the message:

ERROR: SimpleSample3.epub/EPUB/Content/C_bodymatter.xhtml(15,128): report: The 
a element must not appear inside a elements.

EXPECTED:

See what W3C Validator says:

According to Doctype XHTML 1.1 (for an EPUB2) :

 Line 15, Column 123: document type does not allow element "a" here; missing one of "label", "span", "em", "strong", "dfn", "code", "samp", "kbd", "var", "cite", "abbr", "acronym", "q", "tt", "i", "b", "big", "small", "sub", "sup", "bdo", "object", "ins", "del" start-tag
…ng elit<a class="footnote" 
href="content2.xhtml#fnt18"><sup>[18]</sup></a>,</a>
✉
The mentioned element is not allowed to appear in the context in which you've 
placed it; the other mentioned elements are the only ones that are both allowed 
there and can contain the element mentioned. This might mean that you need a 
containing element, or possibly that you've forgotten to close a previous 
element.

One possible cause for this message is that you have attempted to put a 
block-level element (such as "<p>" or "<table>") inside an inline element (such 
as "<a>", "<span>", or "<font>").

PLATFORM:

Windows 7 pro

Original issue reported on code.google.com by vgros00@gmail.com on 4 Jul 2013 at 9:28

Attachments:

GoogleCodeExporter commented 8 years ago
THIS ISSUE MOVED TO GITHUB:
https://github.com/IDPF/epubcheck/issues/

Original comment by rdeltour@gmail.com on 7 Nov 2013 at 10:49