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?


On Tue, Feb 01, 2000 at 05:32:36PM -0500, 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".

I see the immediate preceding list as "list1". 
"list1"'s <listitem> was the last closed tag. 
If you think on the opening of the list, it has to be 3. If you think
on the last finished list, it has to be 5. 

> 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 you're outside "list1"'s hierarchy, it must be. 

> 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 expect that it generates an error. When is list number reseted? I
thought that they were restarted at each section. If it is that way,
then these documents that rely on the structure you described above
are broken. They use a "bug" as a feature. 

> 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".

"bar" _is_ a continuation of "foo". "foo" was the last finished list
(I mean, the last list which has it's </???list> tag). 

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

Why it's too late? It does make sense. 

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

I would say:

   If Continuation is specified, it indicates how list numbering
   should begin relative to the immediately preceding list. The
   immediately preceding list is the closest finished OrderedList, 
   i.e. which has it's </OrdereList> element, in document order, which
   begins before the current list.

This:

   but is not an ancestor of the current list. 

can be eliminated, since an ancestor of this list is not finished
yet. 

Actually, I would think very carefully if changing "finished" for
"closed" wouldn't make things clearer.

Regards,
--
Godoy.	<godoy@conectiva.com.br>               GPG Fingerprint
                                         851B B620 626D 2AD0 E783
"Ser poeta não é minha ambição,          E932 1330 BE6D A4A3 0625 
 é minha maneira de estar sozinho"
              - Fernando Pessoa.       Publicações @ Conectiva S.A. 

Except where explicitly stated I speak on my own behalf.
Exceto onde explicitado as declarações aqui feitas são apenas minhas.


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