[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK: What are the semantics of list number continuation?
Given the following structure <orderedlist id="list1"> <listitem>...</listitem> <listitem>...</listitem> <listitem>...</listitem> <listitem>...</listitem> <listitem> <orderedlist id="list2"> <listitem>...</listitem> <listitem>...</listitem> </orderedlist> </listitem> </orderedlist> <orderedlist id="list3" continuation="continues"> <listitem id="citem">...</listitem> <listitem>...</listitem> </orderedlist> What is the proper value for the numeration of listitem "citem"? The answer hinges on the semantics of continuation, but the documentation is, um, insufficiently precise: If Continuation is specified, it indicates how list numbering should begin relative to the immediately preceding list. The question is, what is the immediately preceding list? My first reaction is that I want the answer to be "5", but I think it has to be "3", and I think that answer is justifiable: the immediately preceding list is "list2". Furthermore, I'm not sure that a set of semantics that made the answer "5" would be easy to express. Consider the isomorphic hierarchy: <note id="note1"> <para>...</para> <para>...</para> <para>...</para> <para>...</para> <para> <orderedlist id="list2"> <listitem>...</listitem> <listitem>...</listitem> </orderedlist> </para> </note> <orderedlist id="list3" continuation="continues"> <listitem id="citem">...</listitem> <listitem>...</listitem> </orderedlist> Here the answer must be "3", yes? If not, then the desired semantic is perhaps "preceding sibling". But that would make the following ineffective: <section id="sec1"> <title>...</title> <orderedlist id="list2"> <listitem>...</listitem> <listitem>...</listitem> </orderedlist> </section> <section id="sec2"> <title>...</title> <orderedlist id="list3" continuation="continues"> <listitem id="citem">...</listitem> <listitem>...</listitem> </orderedlist> </section> And I expect there are some documents that rely on this. I'm uncomfortable trying to express the semantics in even more complex terms such as "the nearest preceding list not itself nested inside a list which precedes the list in question" because there's no reason that you couldn't have structures like this: <orderedlist> <listitem> <orderedlist id="foo">...</listitem> </listitem> <listitem> <orderedlist id="bar" continuation="continues">...</listitem> </listitem> </orderedlist> Where "bar" should appear to be a continuation of "foo". In these days of more powerful stylesheet languages (we worked out some of the semantics long before there were popular implementations of DSSSL or XSL which have considerable expressive power), I think I would argue that continuation ought to be an IDREF back to the list that is to be continued, but it's too late for that now. In summary, I think that the definition of continues should be more carefully worded: If Continuation is specified, it indicates how list numbering should begin relative to the immediately preceding list. The immediately preceding list is the closest OrderedList, in document order, which begins before the current list but is not an ancestor of the current list. Restarts, the default, indicates that numbering should begin again at 1. Continues indicates that numbering should begin where the immediately preceding list left off. Comments? Cheers, norm -- Norman Walsh <ndw@nwalsh.com> | Men do not quit playing because http://www.oasis-open.org/docbook/ | they grow old; they grow old Member, DocBook Editorial Board | because they quit playing.--Oliver | Wendell Holmes
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC