Menu

#68 Simplify ToC content model

v5.0 FU for 6.0
closed-accepted
DocBook (176)
5
2003-11-16
2001-11-17
No

Former RFE 97

See also RFE 38.

- ToC content model will be simplified.
- The semantic of a ToC is that it only contains
entries for the
elements that are it's peers and descendants of its
peers.
- The semantic of an empty ToC is that it is a
location where
an automatically generated ToC is to appear.

Perhaps:

<!ELEMENT ToC - O ((%bookcomponent.title.content;)?,
(%component.mix;)*, (ToCDiv* | ToCEntry*))
%ndxterm.exclusion;>
<!ATTLIST ToC
%pagenum.attrib;
%common.attrib;
%toc.role.attrib;
%local.toc.attrib;
>

<!ELEMENT ToCDiv - O ((%sect.title.content;)?, ((%
tocdivcomponent.mix;)*,
ToCEntry+))>
<!ATTLIST ToCDiv
%linkend.attrib; --to element that this entry
represents--
%pagenum.attrib;
%common.attrib;
%toc.role.attrib;
%local.toc.attrib;
>

<!ELEMENT ToCEntry - - ((%para.char.mix;)+,ToCEntry*)>
<!ATTLIST ToCEntry
%linkend.attrib; --to element that this entry
represents--
%pagenum.attrib;
%common.attrib;
%tocentry.role.attrib;
%local.tocentry.attrib;
>

Discussion

  • Norman Walsh

    Norman Walsh - 2001-11-30

    Logged In: YES
    user_id=81663

    Simplifying is a good idea. Is this the right simplification?

     
  • Norman Walsh

    Norman Walsh - 2002-01-31
    • status: open --> pending
     
  • Norman Walsh

    Norman Walsh - 2002-02-06
    • status: pending --> open
     
  • Robert Stayton

    Robert Stayton - 2003-11-16

    Logged In: YES
    user_id=193218

    The DocBook TC adopted the following content models for
    version 5.0 of the DTD, as described in Norm Walsh's
    message:
    http://lists.oasis-
    open.org/archives/docbook/200304/msg00051.html

    <!ELEMENT toc - o ((%bookcomponent.title.content;)?,
    (%component.mix;)*,
    (tocdiv|tocentry)*)>
    <!ATTLIST toc
    %pagenum.attrib;
    %common.attrib;
    %toc.role.attrib;
    %local.toc.attrib;
    >

    <!ELEMENT tocdiv - o ((%sect.title.content;)?,
    ((%divcomponent.mix;)*,
    (tocdiv|tocentry)+))>
    <!ATTLIST tocdiv
    %linkend.attrib; --to element that this entry represents-
    -
    %pagenum.attrib;
    %common.attrib;
    %toc.role.attrib;
    %local.toc.attrib;
    >

    <!ELEMENT tocentry - - ((%para.char.mix;)*)>
    <!ATTLIST tocentry
    %linkend.attrib; --to element that this entry
    represents--
    %pagenum.attrib;
    %common.attrib;
    %tocentry.role.attrib;
    %local.tocentry.attrib;
    >

    For example:

    <toc><title>DocBook: The Definitive Guide</title>
    <para>TDG has an introduction and three parts.</para>
    <tocentry>Preface</tocentry>
    <tocdiv><title>Introduction</title>
    <tocentry>Getting Started with SGML/XML</tocentry>
    <tocentry>...</tocentry>
    </tocdiv>
    </toc>

     
  • Robert Stayton

    Robert Stayton - 2003-11-16
    • status: open --> closed-accepted
     

Log in to post a comment.