Ordered list inside of the list item

Post here questions and problems related to editing and publishing DITA content.
justyna_i
Posts: 33
Joined: Mon Oct 08, 2018 12:16 pm

Ordered list inside of the list item

Post by justyna_i »

Hello,

I would like to create an ordered list inside of the list item (of the existing ordered list).
When I next <ol> element inside of <li> I get second level bullets (a, b, c instead of 1, 2, 3).

Is there any way to make dita think that this is completely new ordered list and start numbering on top level?
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Ordered list inside of the list item

Post by chrispitude »

Hi justyna_i,

Are you looking for something like this, starting a new count but using the same number format?

Code: Select all

1. Top list item 1
2. Top list item 2
   1. Lower list item 1
   2. Lower list item 2
   3. Lower list item 3
3. Top list item 3
justyna_i
Posts: 33
Joined: Mon Oct 08, 2018 12:16 pm

Re: Ordered list inside of the list item

Post by justyna_i »

Yes, something like that.
chrispitude wrote: Tue Aug 15, 2023 2:45 am Hi justyna_i,

Are you looking for something like this, starting a new count but using the same number format?

Code: Select all

1. Top list item 1
2. Top list item 2
   1. Lower list item 1
   2. Lower list item 2
   3. Lower list item 3
3. Top list item 3
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Ordered list inside of the list item

Post by chrispitude »

Hi justyna_i,

What transformation types are you using?

Do you want this behavior for every second-level ordered list in every document, or only for certain ones?
justyna_i
Posts: 33
Joined: Mon Oct 08, 2018 12:16 pm

Re: Ordered list inside of the list item

Post by justyna_i »

I am using pdf based on XSL-FO and I have a custom plugin for this product. Right now I don't see any other instances where this would have to be used but I wouldn't want to apply this change to all second-level ordered lists.

chrispitude wrote: Tue Aug 15, 2023 11:47 am Hi justyna_i,

What transformation types are you using?

Do you want this behavior for every second-level ordered list in every document, or only for certain ones?
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Ordered list inside of the list item

Post by chrispitude »

For this situation, maybe you could define an @outputclass value of "top" on the lower-level <ol> element, then add some XSL-FO customization to also render such @outputclass-matching lists as top-level lists.

It looks like you could duplicate and customize the topic/ol processing template at

<DITA-OT>/plugins/org.dita.pdf2/xsl/fo/lists.xsl
Post Reply