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;
>
Logged In: YES
user_id=81663
Simplifying is a good idea. Is this the right simplification?
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>