OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[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 Bob,

Sorry, didn't reply to "all" first time.

Attached is a truncated version of the glossary. 

It's xincluded as the child of a <book>.

Thanks.


On 30 July 2014 21:32, Bob Stayton <bobs@sagehill.net> wrote:
Hi Peter,
Can you post the DocBook input that generated that output?

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)



--

Peter Lavin
Telephone:      1 416 461 4991
Mobile:            1 416 882 9194
Skype:             peter.lavin
(GMT -05:00 Canada/US Eastern)
<!DOCTYPE glossary
[
<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
<glossary xmlns="http://docbook.org/ns/docbook";
  xmlns:xi="http://www.w3.org/2001/XInclude"; xmlns:xl="http://www.w3.org/1999/xlink"; version="5.0"
   xml:id="db.gloss">

  <info>

    <title>Glossary</title>

  </info>

<!-- Add an id for items with acronyms so that an acronym entry can be
created. -->

  <!--glossentry xml:id="db.gloss.">

    <glossterm></glossterm>

    <acronym></acronym>

    <indexterm>
      <primary></primary>
    </indexterm>

    <glossdef>
      <para></para>
    </glossdef>

  </glossentry-->

  <glossentry xml:id="db.gloss.css">

    <glossterm>Cascading Style Sheets</glossterm>

    <acronym>CSS</acronym>

    <indexterm>
      <primary>Cascading Style Sheets</primary>
    </indexterm>

    <glossdef>
      <para>...</para>
    </glossdef>

  </glossentry>

  <glossentry xml:id="db.gloss.epub">

    <glossterm>EPUB (3.0)</glossterm>

    <indexterm>
      <primary>EPUB</primary>
    </indexterm>

    <glossdef>
      <para>
        The EPUB specification is an industry standard for defining how
        an ebook is packaged as a single file. Some ebook vendors,
        Google, Apple and Kobo, for example, require that any books
        submitted for sale must conform to this standard. There are
        DocBook style sheets for creating files compliant with EPUB 3.0.
        See also <xref linkend="db.gloss.idpf"/>.
      </para>
    </glossdef>

  </glossentry>

  <glossentry xml:id="db.gloss.idpf">

    <glossterm>International Digital Publishing Forum</glossterm>

    <acronym>IDPF</acronym>

    <indexterm>
      <primary>International Digital Publishing Forum</primary>
    </indexterm>

    <glossdef>
      <para>
        The IDPF is a "standards organization dedicated to the
        development and promotion of electronic publishing and content
        consumption." This organization is responsible for defining the
        <xref linkend="db.gloss.epub"/> standard
      </para>
      <para>
        For more information see
        <link xl:href="http://idpf.org/about-us";>International Digital
        Publishing Forum</link>.
      </para>
    </glossdef>

  </glossentry>

  <glossentry xml:id="db.gloss.json">

    <glossterm>JavaScript Object Notation</glossterm>

    <acronym>JSON</acronym>

    <indexterm>
      <primary>JSON</primary>
    </indexterm>

    <glossdef>
      <para>
        JavaScript Object Notation is ...
      </para>
    </glossdef>

  </glossentry>

  <glossentry xml:id="db.gloss.ocf">

    <glossterm>Open Container Format</glossterm>

    <acronym>OCF</acronym>

    <indexterm>
      <primary>Open Container Format (OCF)</primary>
    </indexterm>

    <glossdef>
      <para>
        The file format and process that defines the resources that make
        up one or more EPUB publications. This standard was created by
        the <xref linkend="db.gloss.idpf"/> and facilitates the
        distribution of ebooks in a single-file format.
      </para>
      <para>
        For more information see
        <link xl:href="http://www.idpf.org/epub/30/spec/epub30-ocf.html";>EPUB
        Open Container Format (OCF) 3.0</link>.
      </para>
    </glossdef>

  </glossentry>

  <glossentry xml:id="db.gloss.pandoc">

    <glossterm>Pandoc</glossterm>

    <indexterm>
      <primary>pandoc</primary>
    </indexterm>

    <glossdef>
      <para></para>
    </glossdef>

  </glossentry>

  <glossentry xml:id="db.gloss.profile">

    <glossterm>Profiling</glossterm>

    <indexterm>
      <primary>profiling</primary>
    </indexterm>

    <glossdef>
      <para>
        One of the advantages of using DocBook to create documents is
        the ability to use profiling. With profiling you can select
        portions of a document for output rather than the complete
        contents. Profiling is used to create different documents from
        the same DocBook files depending upon the values passed to the
        <literal>profile.condition</literal> parameter. Creating more
        than one document from the same source files can greatly reduce
        maintenance.
      </para>
      <para>
        To use profiling follow these steps:
      </para>
      <orderedlist>

        <listitem>
          <para>
            Add appropriate <literal>condition</literal> attributes to
            your DocBook file or files
          </para>
        </listitem>

        <listitem>
          <para>
            Apply the profile style sheet being sure that the right
            values are associated with the
            <literal>profile.condition</literal> string.
          </para>
        </listitem>

        <listitem>
          <para>
            Process the file output by step two.
          </para>
        </listitem>

      </orderedlist>
    </glossdef>

  </glossentry>

  <glossentry xml:id="db.gloss.xsl">

    <glossterm>Extensible Stylesheet Language</glossterm>

    <acronym>XSL</acronym>

    <indexterm>
      <primary>xsl</primary>
    </indexterm>

    <glossdef>
      <para>Extensible Stylesheet Language </para>
    </glossdef>

  </glossentry>

</glossary>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]