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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] OrderedList and 'continuation' attribute


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
bobs@sagehill.net
 
 
----- Original Message -----
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


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