Issue 52330 - Ordered Lists are not nested correctly in the flat XML
Summary: Ordered Lists are not nested correctly in the flat XML
Status: UNCONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 680m118
Hardware: All All
: P4 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needhelp
Depends on:
Blocks:
 
Reported: 2005-07-22 14:10 UTC by anupkshah
Modified: 2017-05-20 10:44 UTC (History)
6 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sample OpenOffice Text Document showing list nesting error (9.11 KB, application/vnd.oasis.opendocument.text)
2005-11-28 16:01 UTC, anupkshah
no flags Details
Raw underlying XML of the sample document previously attached (36.69 KB, text/xml)
2005-11-28 16:02 UTC, anupkshah
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description anupkshah 2005-07-22 14:10:51 UTC
Hi,

If I create a new Word processing/Text document and simply use the tool bar to
created bulleted or numbered lists, and then I use the ability to indent them to
created nested numbered or nested bulleted lists, while this appears to work
visually, this is actually produces XML that is semantically, or structurally
less accurate. This can potentially pose accessibility problems (imagine a
screen reader trying to convey to a blind user such a nested bulleted list -- it
becomes difficult to convey actual structure, making it harder to gain a mental
map of the information.)

Just to clarify, this problem seems to be when you mix bullets and numbered
items (e.g. numbered items contain bulleted lists, and bulletd lists contain
numbered items).

Below is the underyling XML snippet for a number of nested list items, and below
that I will propose how it should ideally be, and why:

1) Current:
<text:ordered-list text:style-name="L22">
  <text:list-item>
    <text:p text:style-name="P23">Bullet 1</text:p>
    <text:ordered-list>
      <text:list-item>
        <text:p text:style-name="P23">Bullet 1.1</text:p>
      </text:list-item>
      <text:list-item>
        <text:p text:style-name="P23">Bullet 1.2</text:p>
      </text:list-item>
    </text:ordered-list>
  </text:list-item>
  <text:list-item>
    <text:p text:style-name="P23">Bullet 2</text:p>
  </text:list-item>
</text:ordered-list>
<text:ordered-list text:style-name="L23">
  <text:list-item>
    <text:ordered-list>
      <text:list-item>
        <text:p text:style-name="P24">Number 2.1</text:p>
      </text:list-item>
      <text:list-item>
        <text:p text:style-name="P24">Number 2.2</text:p>
      </text:list-item>
    </text:ordered-list>
  </text:list-item>
</text:ordered-list>
<text:ordered-list text:style-name="L24">
  <text:list-item>
    <text:p text:style-name="P25">Bullet 3</text:p>
  </text:list-item>
</text:ordered-list>
<text:ordered-list text:style-name="L25">
  <text:list-item>
    <text:ordered-list>
      <text:list-item>
        <text:p text:style-name="P26">Number 3.1</text:p>
        <text:ordered-list>
          <text:list-item>
            <text:p text:style-name="P26">Number 3.1.1</text:p>
          </text:list-item>
          <text:list-item>
            <text:p text:style-name="P26">Number 3.1.2</text:p>
          </text:list-item>
        </text:ordered-list>
      </text:list-item>
      <text:list-item>
        <text:p text:style-name="P26">Number 3.2</text:p>
      </text:list-item>
    </text:ordered-list>
  </text:list-item>
</text:ordered-list>
<text:ordered-list text:style-name="L24">
  <text:list-item>
    <text:ordered-list>
      <text:list-item>
        <text:ordered-list>
          <text:list-item>
            <text:p text:style-name="P25">Bullet 3.2.1</text:p>
          </text:list-item>
          <text:list-item>
            <text:p text:style-name="P25">Bullet 3.2.2</text:p>
          </text:list-item>
        </text:ordered-list>
      </text:list-item>
    </text:ordered-list>
  </text:list-item>
</text:ordered-list>

As you can see from the above, each nested list starts in its own
<text:ordered-list> tag, with various empty <text:ordered-list> sub tags, until
it gets to the correct indentation level. This is redundant and less
semantically correct (XML after all is about adding structure to data.)

2) Propose that the above be somehow rendered as follows (see comment below as
well, on why this is important):
<text:ordered-list text:style-name="L22">
  <text:list-item>
    <text:p text:style-name="P23">Bullet 1</text:p>
    <text:ordered-list>
      <text:list-item>
        <text:p text:style-name="P23">Bullet 1.1</text:p>
      </text:list-item>
      <text:list-item>
        <text:p text:style-name="P23">Bullet 1.2</text:p>
      </text:list-item>
    </text:ordered-list>
  </text:list-item>
  <text:list-item>
    <text:p text:style-name="P23">Bullet 2</text:p>
    <text:ordered-list text:style-name="L23">
      <text:list-item>
        <text:p text:style-name="P24">Number 2.1</text:p>
      </text:list-item>
      <text:list-item>
        <text:p text:style-name="P24">Number 2.2</text:p>
      </text:list-item>
    </text:ordered-list>
  </text:list-item>
  <text:list-item>
    <text:p text:style-name="P25">Bullet 3</text:p>
    <text:ordered-list text:style-name="L25">
      <text:list-item>
        <text:p text:style-name="P26">Number 3.1</text:p>
        <text:ordered-list>
          <text:list-item>
            <text:p text:style-name="P26">Number 3.1.1</text:p>
          </text:list-item>
          <text:list-item>
            <text:p text:style-name="P26">Number 3.1.2</text:p>
          </text:list-item>
        </text:ordered-list>
      </text:list-item>
      <text:list-item>
        <text:p text:style-name="P26">Number 3.2</text:p>
        <text:ordered-list text:style-name="L24">
          <text:list-item>
            <text:p text:style-name="P25">Bullet 3.2.1</text:p>
          </text:list-item>
          <text:list-item>
            <text:p text:style-name="P25">Bullet 3.2.2</text:p>
          </text:list-item>
        </text:ordered-list>
      </text:list-item>
    </text:ordered-list>
  </text:list-item>
</text:ordered-list>

(I may have subtle errors in the above as I hand-edited the original problematic
example, but you get the idea!)
The idea behind this is simple: to have a structure, similar to (X)HTML how you
would nest lists.

I believe the OASIS XML Document format, from I have seen of the spec, allows
for these to be nested in this way, so I think OpenOffice should do as much as
it can to ensure this happens.

Why this issue is important:
1) Interoperability with other systems: if other systems need to convert this to
another XML format, (or any other text-based format), it is going to be more
complicated to deal with these problems. It may turn people away to other
solutions instead.
2) I believe Open Office gives the power to create truly clean XHTML (i.e. no
style information, just pure tags). This is critical for web accessibility and
the ability to manage large sites with many files via external CSS. The cleaner
the XHTML that can be output, the better the chance that people can use
OpenOffice to help them create web documents. What this implies is that
OpenOffice is being used to create the raw document (some style templates may be
used for users to see roughly how it might look, but that is taken care of by
company-wide CSS files).
3) Keeps the file size down (minor issue, but every little thing helps!)
4) Accessibility (important issue, especially in countries where it is a legal
requirement to ensure web sites and other sources of information are accessible,
or that someone can simply do their job even if they are disabled, etc).
Especially for the web, accessibility is achieved largely (though not solely) by
ensuring good semantic markup. With lists, imagine the above. It will normally
be converted to something rather ugly like the following:

<ul>
  <li>Bullet 1
    <ul>
      <li>Bullet 1.1</li>
      <li>Bullet 1.2</li>
    </ul>
  </li>
  <li>Bullet 2</li>
</ul>
<ol>
  <li>
    <ol>
      <li>Number 2.1</li>
      <li>Number 2.2</li>
    </ol>
  </li>
</ol>
<ul>
  <li>Bullet 3</li>
</ul>
<ol>
  <li>
    <ol>
      <li>Number 3.1
        <ol>
          <li>Number 3.1.1</li>
          <li>Number 3.1.2</li>
        </ol>
      </li>
      <li>Number 3.2</li>
    </ol>
  </li>
</ol>
<ul>
  <li>
    <ul>
      <li>
        <ol>
          <li>Bullet 3.2.1</li>
          <li>Bullet 3.2.2</li>
        </ol>
      </li>
    </ul>
  </li>
</ul>

Clearly the above is not acceptable.

Yet, what we really want is the following:

<ul>
  <li>Bullet 1
    <ul>
      <li>Bullet 1.1</li>
      <li>Bullet 1.2</li>
    </ul>
  </li>
  <li>Bullet 2
    <ol>
      <li>Number 2.1</li>
      <li>Number 2.2</li>
    </ol>
  </li>
  <li>Bullet 3
    <ol>
      <li>Number 3.1
        <ol>
          <li>Number 3.1.1</li>
          <li>Number 3.1.2</li>
        </ol>
      </li>
      <li>Number 3.2
        <ul>
          <li>Bullet 3.2.1</li>
          <li>Bullet 3.2.2</li>
        </ul>
      </li>
    </ol>
  </li>
</ul>

I therefore believe that this urgently needs to be fixed.

I have reported this against 1.9.118 but I have seen it in 113 I think, as well.
Comment 1 jogi 2005-07-28 08:11:50 UTC
-> MIB
Comment 2 jogi 2005-07-28 08:12:41 UTC
again -> MIB
Comment 3 andreschnabel 2005-11-27 11:43:24 UTC
lowering priority, as it is no crash or data loss. Basic functionality works
correct, as the current xml is valid.

Setting to enhancement (current xml output is valid but needs improvement).

anupkshah: could you provife a example odt-ocument, so it was mor easy to
generate the XML output from it?

Comment 4 andreschnabel 2005-11-27 11:48:32 UTC
adding accessibilty keyword as suggested in the comments
Comment 5 ptsefton 2005-11-28 06:28:00 UTC
This is a real problem - but there is no simple solution. 

How is the user expected to keep track of all this nesting using the GUI? Which
lists should be nested and which should not? How does a user keep track of
paragraph styles and list styles which can be applied independently or not at
all? How can a user keep track of lists that may or may not be indented? What
about when the document has been loaded from MS Word format and the list styles
all have names like WWNum9 instead of a sensible name?

The current GUI is not adequate as it is without adding more complexity (ie real
nesting).

It is generally considered good practice to use styles in a document, rather
than apply ad hoc formatting using the toolbar but there is a huge gap in
Writer's functionality - there is no way to map styles to HTML structures on
export without writing a filter and dealing with image export and so on.

Comment 6 anupkshah 2005-11-28 16:01:17 UTC
Created attachment 31869 [details]
Sample OpenOffice Text Document showing list nesting error
Comment 7 anupkshah 2005-11-28 16:02:00 UTC
Created attachment 31870 [details]
Raw underlying XML of the sample document previously attached
Comment 8 anupkshah 2005-11-28 16:04:27 UTC
Hi, I added two attachements:
RawXmlForIncorrectListNesting.odt and
RawXmlForIncorrectListNesting.xml (and only after attaching, did I realize the
file name for the odt was poor!)

Anyway, the odt has a simple nested list file. Mixed nestings do not have the
right xml, as the second attachment shows. I generated this by creating an XSL
filter that simply outputted everything.

By the way, I think this is NOT an enhancement. It is a defect. It might appear
to work, but structurally it is wrong. I think therefore this should be changed
back to a defect (I don't know how to do that, unfortunately... Can someone do
that for me, please?)
Comment 9 michael.brauer 2005-12-02 11:41:46 UTC
Neither OOo nor OpenDocument support nested lists with different list styles. So
this is a feature request for Writer itself.
Comment 10 anupkshah 2005-12-02 12:00:01 UTC
Are you sure this is not supported? When I manually created an OpenDocument xml
file and imported it into OpenOffice (did this some time ago, so not sure I have
the sample files any more, but they were basically of the same type of XML in my
very first comment), it *loaded*. However, once it was loaded, it again seemed
to be represented incorrectly, internally (proved when I then saved it.)

Seems quite a limitation not to support it. Wouldn't have expected OASIS to be
so short sighted... :(

Comment 11 anupkshah 2005-12-02 12:00:54 UTC
Are you sure this is not supported? When I manually created an OpenDocument xml
file and imported it into OpenOffice (did this some time ago, so not sure I have
the sample files any more, but they were basically of the same type of XML in my
very first comment), it *loaded*. However, once it was loaded, it again seemed
to be represented incorrectly, internally (proved when I then saved it.)

Seems quite a limitation not to support it. Wouldn't have expected OASIS to be
so short sighted... :(

I know the priority is 4, but is there a chance someone can bump this up (if
they agree with me that this is quite important an issue)?
Comment 12 ace_dent 2008-05-15 00:26:39 UTC
This Issue requires more information ('needmoreinfo'), but has not been updated
within the last year. Please re-test with one of the latest versions of OOo -
the problem(s) may have already been addressed. Either use the recent stable
version: http://download.openoffice.org/index.html
or consider trying the new OOo 3 BETA (still in testing):
http://download.openoffice.org/3.0beta/

Please report back the outcome so this Issue may be closed or progressed as
necessary - otherwise it may be Resolved as Invalid in the future. You may also
wish to search for (and note) any duplicates of this Issue that may have
advanced further :
http://www.openoffice.org/issues/query.cgi

Many thanks,
Andrew

Cleaning-up and Closing old Issues as part of:
~ The Grand Bug Squash, pre v3 ~
Comment 13 anupkshah 2008-05-18 00:46:12 UTC
Andrew,

Yes, this is still a problem (I have tried it using OpenOffice 2.4 on Kubuntu 8.04
Comment 14 malte_timmermann 2008-06-12 17:32:40 UTC
ODF or Writer implementation Issues, but not really accessibility.
I will forward this to the OASIS ODF Accessibility SC so they can decide.
Removed "Accessibility" keyword for now.
If it is, then the SC will suggest changes to ODF TC
Comment 15 Oliver-Rainer Wittmann 2008-07-16 09:42:18 UTC
Thanks to MT to bring my attention on this issue.

The problem described in this issue is caused by a certain user interface
behavior and by an inappropriate usability feedback to the user.

First, using the toolbar button "Numbering On/Off" and "Bullet On/Off" in
general starts a _new_ list. E.g. in OOo 3.0 Beta:
- create new text document.
- insert two paragraphs "A" and "B"
- place cursor in paragraph "A" and hit "Numbering On/Off"
--> new list "List One" containing paragraph "A" as its only list item on list
level 1
--> resulting ODF XML snippet:
<text:list text:list-style-name="L1">
  <text:list-item>
    <text:p>A</text:p>
  </text:list-item>
</text:list>
- place cursor in paragraph "B" and hit "Bullet On/Off"
--> new list "List Two" containing paragraph "B" as its only list item on list
level 1
--> resulting ODF XML snippet:
<text:list text:list-style-name="L2">
  <text:list-item>
    <text:p>B</text:p>
  </text:list-item>
</text:list>
- place cursor in paragraph "B" and move it to list level 2 using "Demote One
Level" from "Bullets & Numbering" toolbar.
--> list "List Two" still contains paragraph "B" as its only list item, but now
on list level 2
--> resulting ODF XML snippet:
<text:list text:list-style-name="L2">
  <text:list-item>
    <text:list>
      <text:list-item>
        <text:p>B</text:p>
      </text:list-item>
    </text:list>
  </text:list-item>
</text:list>
--> There still two lists in your document. The last user action does not join
the separately created two lists.

I stated that _in general_ "Numbering On/Off" resp. "Bullet On/Off" starts a new
list. The exception is:
- On hitting "Numbering On/Off"/"Bullet On/Off" the previous paragraph of the
first paragraph of the new list is investigated (empty paragraphs are skipped).
Is it numbered and "Numbering On/Off" is hit the new list is joined into the
list of this previous paragraph. Is the previous paragraph bulleted and "Bullet
On/Off" is hit the new list is joined into the list of this previous paragraph.

Thus, "Numbering On/Off" and "Bullet On/Off" can not be used to created _one_
list whose items are numbered and bulleted. Inappropriate in its use is that the
user does not get feedback about the fact, that a new list is created or a
previous one is continued.
Also improvable in the user interface is to retrieve information about which
paragraphs belong to a certain list.

To create _one_ list of the following shape:
1. A - numbered on list level 1
2. B - numbered on list level 1
  * C - bulleted on list level 2
  * D - bulleted on list level 2
3. E - numbered on list level 1
the following steps can be used:
- Create new text document
- Type "A"
- Hit "Numbering On/Off"
- Hit ENTER and type "B"
- Hit ENTER and hit TAB
- Type "C"
- Open dialog "Bullets & Numbering", pane "Options" via Menu Format - Bullets &
Numbering
- Change "Numbering" of list level 2 to Bullet and choose appropriate bullet
character
- Confirm the dialog
- Hit ENTER and type "D"
- Hit ENTER and hit SHIFT-TAB
- Type E

Thus from my point of view, no core changes are needed to the Writer to create
proper nested lists, whose list items are numbered and bulleted.
What is needed is to aware the user about the behavior of "Numbering On/Off" and
"Bullet On/Off", and probably certain to be defined improvements to the user
interface provided better feedback about which paragraphs belong to a certain list.

In my opinion this issue can be closed, but certain follow-up issue should be
submitted to improve the user interface and its feedback to the user.
Comment 16 Rob Weir 2013-02-02 03:01:07 UTC
This Issue requires more information ('needmoreinfo'), but has not been updated
within the last year. Please provide feedback as requested and re-test with the the latest version of OpenOffice - the problem(s) may already be addressed. 

You can download Apache OpenOffice 3.4.1 from http://www.openoffice.org/download

Please report back the outcome of your testing, so this Issue may be closed or
progressed as necessary - otherwise the issue may be Resolved as Invalid in the
future.
Comment 17 Edwin Sharp 2014-04-07 11:51:48 UTC
General Error.
General input/output error.
When opening attachment 31870 [details]

AOO410m15(Build:9761)  -  Rev. 1583666
2014-04-01 13:50 - Linux x86_64
Debian
Comment 18 Marcus 2017-05-20 10:44:33 UTC
Reset the assignee to the default "issues@openoffice.apache.org".