← Prev in month ← Prev in thread

invalid EPUB file when using a glossary

From
Peter Lavin <>
Date
2014-07-30T23:04:31+00:00
ID
Thread
invalid EPUB file when using a glossary
HI,

I'm attempting to validate an EPUB 3 file that contains a glossary and I'm seeing the following error for each glossary entry:

ERROR: book.epub/OEBPS/db.gloss.xhtml(22,48): element "a" not allowed here; expected element "dd" or "dt"

I'm using Epubcheck Version 3.0.1 and my style sheets are 1.78.1 (docbook-xsl-ns). 

An example of the HTML that raises the error follows:

<dl>

<dt id="db.gloss.json"><span class="glossterm" epub:type="glossterm"/> (<abbr class="acronym">JSON</abbr>)</dt>

<a id="idp1493040" class="indexterm"/>

<dd class="glossdef" epub:type="glossdef">

  <p/>

</dd>

...

</dl>

Attempting to validate this HTML at the W3C site throws the following error:

Line 22, Column 46: XHTML element a not allowed as child of XHTML element dl in this context. (Suppressing further errors from this subtree.)

        <a id="idp1493040" class="indexterm"/>

        

Am I correct in assuming that this style sheet generates invalid HTML?

If so, how can this be fixed?

Thanks.

-- 

Peter Lavin

Skype:             peter.lavin

(GMT -05:00 Canada/US Eastern)
← Prev in month ← Prev in thread