Problem when sorting a list

Post here questions and problems related to editing and publishing DITA content.
susannecm
Posts: 109
Joined: Wed Mar 17, 2010 1:04 pm

Problem when sorting a list

Post by susannecm »

Hi everyone,
I am trying to sort an unordered list inside a table cell, but nothing happens.
Is this on purpose, or could I be doing something wrong?
Thank you for your help
Susanne
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Problem when sorting a list

Post by chrispitude »

Hi Susanne,

I don't think you're doing anything wrong. I was able to reproduce this issue in the Oxygen v25 nightly build (2022092906).
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem when sorting a list

Post by Radu »

Hi,

Can you give me a small sample topic and a sequence of steps?
Right I cannot reproduce the problem, so I have a DITA topic like this:

Code: Select all

<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_xsh_pkf_dvb">
    <title>abc</title>
    <body>
    <table id="table_qlq_skf_dvb">
      <title>T1</title>
      <tgroup cols="2">
        <colspec colname="c1" colnum="1" colwidth="1*"/>
        <colspec colname="c2" colnum="2" colwidth="1*"/>
        <tbody>
          <row>
            <entry>
              <ul id="ul_i5y_pkf_dvb">
                <li>l3</li>
                <li>l2</li>
                <li>l1</li>
              </ul>
            </entry>
            <entry/>
          </row>
          <row>
            <entry/>
            <entry/>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
I open it in the Author visual editing mode, select all three list items, then invoke the toolbar action "Sort the cells of a table or the items of a list" with the defaults and it sorts the entries. I tested with both Oxygen 24.1 and 25.0.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Problem when sorting a list

Post by chrispitude »

Hi Radu,

I see what was happening, at least for me.

If you select the <ul> and right-click, you will see a Sort context item whose dialog looks a lot like the sort dialog you get when you do the same thing for a <ul> outside a table. However, the dialog is for table rows, not list items.

I was able to sort the list by either (1) putting the cursor inside the <ul> without selecting any list items, or (2) selecting the list items of interest, then right-clicking and choosing Other actions > Sort.
susannecm
Posts: 109
Joined: Wed Mar 17, 2010 1:04 pm

Re: Problem when sorting a list

Post by susannecm »

Yes, that was the problem! :)
If I select the ul element within a table cell, the software wants to sort rows, even though that doesn't make much sense given the selection.
Easy to handle if you know how, thank you!
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem when sorting a list

Post by Radu »

Hi,
All clear now, I added an internal issue for it with ID:
EXM-51575 Sort contents of unordered list inside table cell actually sorts table rows
If we manage to fix it in a future version we'll update this forum thread.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem when sorting a list

Post by Radu »

Hi,
As an update we released Oxygen 25.1 which should have a fix for this.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply