To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=67850
Issue #|67850
Summary|OOo produces invalid OpenDocument file.
Component|xml
Version|OOo 2.0.3
Platform|All
URL|
OS/Version|All
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|jsi
Reported by|dcarrera
------- Additional comments from [EMAIL PROTECTED] Thu Jul 27 11:30:41 -0700
2006 -------
On a sample document, OOo produced this:
<text:tracked-changes>
<text:changed-region text:id="ct-1396364192">
<text:deletion>
<office:change-info>
<dc:creator>Daniel Carrera</dc:creator>
<dc:date>2006-07-27T18:14:00</dc:date>
</office:change-info>
<text:h text:style-name="Heading_20_1" text:outline-level="1">My
heading</text:h>
<text:p text:style-name="Text_20_body">first paragraph</text:p>
<text:p text:style-name="Text_20_body"/>
</text:deletion>
</text:changed-region>
</text:tracked-changes>
<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:change
text:change-id="ct-1396364192"/>second paragraph</text:h>
In this case, the second paragraph is supposed to be inside a text:p. If you
were to undo the insertion you would get:
<text:h text:style-name="Heading_20_1" text:outline-level="1">My
heading</text:h>
<text:p text:style-name="Text_20_body">first paragraph</text:p>
<text:p text:style-name="Text_20_body">second paragraph</text:p>
But this an invalid way to interpret the ODF spec. If you look at page 80 of the
spec it says:
--- quote start ---
To reconstruct the text before the deletion took place, do:
* If the change mark is inside a paragraph, insert the text content of the
text:deletion element as if the beginning <text:p> and final </text:p> tags were
missing.
* If the change mark is inside a header, proceed as above, except adapt THE
INSERTED TAGS to match their new counterparts.
* Otherwise, simply copy the text content of the <text:deletion> element in
place of the change mark.
--- quote end ---
The relevant item is the second one. If you apply this formula, you find:
* The changeset is INVALID. There is no beginning <text:p> mark.
* The last paragraph should be:
<text:h>second paragraph</text:h>
In other words, it should be a heading.
So, although what OOo does is consistent with itself, it is producing invalid
ODF files and it is interpreting ODF files incorrectly. If you had this:
<text:h text:style-name="Heading_20_1" text:outline-level="1">My
heading</text:h>
<text:p text:style-name="Text_20_body">first paragraph</text:p>
<text:p text:style-name="Text_20_body">second paragraph</text:p>
And you wanted to delete the heading and the first paragraph, you should
represent that either as a deletion outside paragraph marks, or as two deletions
(one containing the heading, and outside the paragraph, and another containing
the first paragraph).
Cheers,
Daniel.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]