This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: What are the semantics of list number continuation?


Norman Walsh wrote:
> 
> 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.

Does the "not an ancestor" mean that I can't do this:

<orderedlist id="list1">
  <listitem>...</listitem>
  <listitem>...</listitem>
  <listitem>...</listitem>
  <listitem>...</listitem>
  <listitem>
    <para>
      Some comments
      <orderedlist id="list2" continuation="continues">
        <listitem>...</listitem>
        <listitem>...</listitem>
      </orderedlist>
    </para>
  </listitem>
  <listitem>...</listitem>
</orderedlist>

or is there some other way to do just that - I'm not familiar with this
stuff.

In Domino,
Peter
-- 
 __ /__   Peter B. West  pbwest@netscape.net
   /     http://www.powerup.com.au/~pbwest
  /     "Lord, to whom shall we go?"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]