All,
This is an interesting discussion. Wouldn't it be great if, in addition to  
the 'continues' attribute, one could also remove all ambiguity in this 
feature  by also adding an ID of the list that is meant to continue? That way  
an author can be very deliberate about which list they are continuing.
 
such as....
 
 
<orderedlist id="firstList'>
<listitem><para>First Item</para></listitem>  
<listitem><para>Second  Item</para></listitem>
<listitem><para>Third  Item</para>  
 <orderedlist id="firstSubList">
<listitem><para>Nested  First Item</para></listitem>
<listitem><para>Nested Second  Item</para></listitem>
<listitem><para>Nested Third  Item</para>  
 <listitem><para>Nested Fourth Item</para>
                   <listitem><para>Nested Fifth Item</para>
                 </orderedlist>
</listitem>

</orderedlist>
 

<orderedlist continuation='continues' linkend='firstSubList'>
<listitem><para>Nested Sixth Item</para></listitem>   
<listitem><para>Nested Seventh  Item Item</para></listitem>

 
</orderedlist>


 
 
 
<orderedlist continuation='continues'  linkend='firstList'>
<listitem><para>Fourth Item</para></listitem>  
<listitem><para>Fifth  Item</para></listitem>

 
</orderedlist>
 
Resulting in the following..
 
1. First Item
2. Second Item
3. Third Item
    a. Nested First Item    
    b. Nested Second Item 
    c. Nested Third Item
    d. Nested Fourth Item 
 
e. Nested Fifth Item
    e. Nested Sixth Item
    e. Nested Seventh Item
6. Fourth Item
7. Fifth Item


 
Or maybe this already exists?
 
Regards,
Dean Nelson
 
 
 
In a message dated 6/10/2011 8:58:21 A.M. Pacific Daylight Time,  
[email protected] writes:

Well, I'm not sure what might be intended by an  author in the situation 
you describe. What do you think should  happen?
 
The main problem that I saw was that  continuation from a list at a 
different level was producing incorrect  numbering, in that the count was taken 
from one list level and the format from  another.  
 
Bob Stayton
Sagehill Enterprises
[email protected]_ (mailto:[email protected]) 
 
 

----- Original Message ----- 
From:  _Howard  Perrin_ (mailto:[email protected])  
To: _Bob Stayton_ (mailto:[email protected])  
Cc: [email protected]_ 
(mailto:[email protected])   
Sent: Friday, June 10, 2011 4:46  AM
Subject: Re: [docbook-apps] OrderedList  and 'continuation' attribute


Bob,  


Thanks very much for your help. That seems to fix the problem - I've  
raised a bug on sourceforge as requested 
(_https://sourceforge.net/tracker/?func=detail&aid=3314663&group_id=21935&atid=373747_
 
(https://sourceforge.net/tracker/?func=detail&aid=3314663&group_id=21935&atid=373747)
 ).


I've noticed though with your fix that if 'continuation=continues' is  used 
on a nested ordered list, and there is not another ordered list at the  
same level as the current one, but there is a nested list at the same level  in 
a previous ordered list, then the numbering from that is picked up. This,  
to my mind, is not really desired behaviour - what do you think? (I hope  
that makes sense, if not I'll send through an example!)


Howard

On 9 June 2011 16:55, Bob Stayton <[email protected]_ 
(mailto:[email protected]) > wrote:


Hi Howard,
I think that is a bug, since the results are  simply wrong.  The numbering 
should continue from the same list  nesting level, in my opinion.  Could you 
please file a bug report on  the DocBook SourceForge site for this?
 
To fix it, take a look at the template named  
'output-orderedlist-starting-number' in common/common.xsl.  In there  you will 
see in the "otherwise" 
case that:
 
<xsl:variable name="prevlist"  select="$list/preceding::orderedlist[1]"/>
 
This selects the previous list regardless of  level, which in your instance 
is the nested list.  I think this  selection should be of the preceding 
list with the same number of  orderedlist ancestors, something like this 
[untested]:
 
<xsl:variable name="prevlist"  
select="$list/preceding::orderedlist[count($list/ancestor::orderedlist) =  
count(ancestor::orderedlist)][1]"/>
 
If DocBook 5, don't forget to add the  namespace prefix.
 
Bob Stayton
Sagehill Enterprises
[email protected]_ (mailto:[email protected]) 
 
 

 
----- Original Message ----- 
From: _Howard Perrin_ (mailto:[email protected])  
To: [email protected]_ 
(mailto:[email protected])  

 
Sent: Thursday, June 09, 2011 1:50  AM
Subject: [docbook-apps] OrderedList  and 'continuation' attribute





Hi,  


I'm having a problem with the 'continuation' attribute on  <orderedlist> 
elements. When I set it to 'continues' and the list  follows a nested list, 
the numbering is started from  the nested list rather than the outer list. For 
example, if I  have:


<orderedlist>
<listitem><para>First  Item</para></listitem>  
<listitem><para>Second  Item</para></listitem>
<listitem><para>Third Item</para>  
 <orderedlist>
<listitem><para>Nested First  Item</para></listitem>
<listitem><para>Nested Second  Item</para></listitem>
<listitem><para>Nested Third Item</para>  
 <listitem><para>Nested Fourth  Item</para>
                   <listitem><para>Nested Fifth Item</para>
                 </orderedlist>
</listitem>

</orderedlist>
 
<orderedlist continuation='continues'>
<listitem><para>Fourth Item</para></listitem>  
<listitem><para>Fifth  Item</para></listitem>

 
</orderedlist>


When transformed using the docbook XSL via FO to PDF the output  looks like:


1. First Item
2. Second Item
3. Third Item
a. Nested First Item
b. Nested Second Item  
c. Nested Third Item
d. Nested  Fourth Item  
e. Nested Fifth Item
6. Fourth Item
7. Fifth Item


Maybe this is intended behaviour - but I want to have 6 & 7  actually 
numbered 4 & 5 so that they continue the numbering from the  list at the same 
level. Does anyone know if/how I can add something to  my customisation layer 
to change the behaviour here?


Thanks!
Howard










Reply via email to