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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Simplify ToC content model


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hand authored ToCs are occasionally useful. Machine generated ToCs
that differ from the automatic ToC are also occasionally useful. But
the current content models for hand-authored ToCs are complex and
incomplete. (Incomplete because we've changed the hierarchy of DocBook
over time but not reflected those changes back in the ToC markup.)

I propose that the right answer is to dramatically reduce the
complexity of the ToC markup. There's nothing to be gained (IMHO) from
identifying the different parts of a book (front matter, back matter,
parts, chapters, sections) with different element names in the ToC.

I propose instead:

<!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>

                                        Be seeing you,
                                          norm

- -- 
Norman Walsh <ndw@nwalsh.com>      | The present moment is a powerful
http://www.oasis-open.org/docbook/ | goddess.--Goethe
Chair, DocBook Technical Committee |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>

iD8DBQE+m/MUOyltUcwYWjsRApmLAJ4voWHLKT0ewok00Wxu/osyAgt71gCfZEug
t1anG/zVvsNshx4196zwASU=
=nJq1
-----END PGP SIGNATURE-----


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