[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] invalid EPUB file when using a glossary
Hi Peter,
Yes, this is a bug. The DocBook schema allows an indexterm element between glossterm and glossdef, but those map to dt and dd, respectively, and they don't allow anything in between. The updated template (attached) puts the indexterm in the dt element. I'll check this change into the SVN repo for the next release.
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
On 7/30/2014 4:04 PM, Peter Lavin wrote:
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)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]