Issue Details (XML | Word | Printable)

Key: FOR-311
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Charles Palmer
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Forrest

OOo Headings bug causes Forrest to fail

Created: 06/Oct/04 10:25 PM   Updated: 12/Mar/07 03:41 PM
Return to search
Component/s: Plugin: input.OpenOffice.org
Affects Version/s: 0.6
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Zip Archive Licensed for inclusion in ASF works headings.zip 2006-10-12 06:58 AM Cyriaque Dupoirieux 12 kB
File Licensed for inclusion in ASF works openoffice-writer.sxw 2006-10-12 06:58 AM Cyriaque Dupoirieux 8 kB
File Licensed for inclusion in ASF works openoffice-writer2.sxw 2006-10-12 06:58 AM Cyriaque Dupoirieux 9 kB
XML File Licensed for inclusion in ASF works openoffice-writer2forrest.xsl 2006-10-12 06:59 AM Cyriaque Dupoirieux 12 kB
File Licensed for inclusion in ASF works openoffice-writer_clay.diff 2006-10-12 06:59 AM Cyriaque Dupoirieux 0.2 kB
File Licensed for inclusion in ASF works openoffice-writer_update.sxw 2006-10-12 06:59 AM Cyriaque Dupoirieux 10 kB
Environment:

Other Info: Patch available


 Description  « Hide
There appears to be a bug or feature in OpenOffice which affects how haedings are stored as XML. It appears that if a virgin document is opened then all headings are stored in <text:h> tags, but if an existing document is opened that lacks a particular haeding style, then if you create that heading style it is stored in <text:p> tags.

This causes Forrest to mis-interpret headings, as the Forrest OOo XSL file identifies OOo headings by looking for the <text:h> tags.

(Moved detail from Description to Comment - see 2005-12-24)

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Charles Palmer made changes - 06/Oct/04 10:28 PM
Field Original Value New Value
Attachment headings.zip [ 10251 ]
Clay Leeds made changes - 21/Oct/04 03:04 AM
Attachment openoffice-writer2forrest.xsl [ 10276 ]
Clay Leeds made changes - 21/Oct/04 06:25 AM
Attachment openoffice-writer.sxw [ 10277 ]
Clay Leeds made changes - 21/Oct/04 05:34 PM
Attachment openoffice-writer_clay.diff [ 10279 ]
Clay Leeds made changes - 22/Oct/04 05:38 PM
Attachment openoffice-writer.sxw [ 10280 ]
Clay Leeds made changes - 29/Oct/04 07:51 PM
Attachment openoffice-writer_update.sxw [ 10289 ]
David Crossley made changes - 05/Nov/04 05:40 PM
Component/s Other [ 10007 ]
Component/s Plugin: OpenOffice.org [ 10032 ]
David Crossley made changes - 24/Dec/05 11:18 AM
Description There appears to be a bug or feature in OpenOffice which affects how haedings are stored as XML. It appears that if a virgin document is opened then all headings are stored in <text:h> tags, but if an existing document is opened that lacks a particular haeding style, then if you create that heading style it is stored in <text:p> tags.

This causes Forrest to mis-interpret headings, as the Forrest OOo XSL file identifies OOo headings by looking for the <text:h> tags.

You can reproduce this effect as follows:
 
1 Create a new text file.
2 Create 20 lines of text, one of each style Heading 1-10, with a "default" format line between each.
3 Save this file (as "head.sxw" for example), unzip it and examine its content.xml. You will see that all of the headings are of the format:

 <text:h text:style-name="Heading 5" text:level="5">Heading 5</text:h>

4 Copy head.sxw this to headless.sxw.
5 Open headless.sxw, delete the Heading 5 line, then save and close the file.
6 Reopen headless.sxw, and add a new line where the original Heading 5 line had been. Change the style of this new line to Heading 5.
7 Save this file, unzip it and examine its content.xml. The new line of style heading 5 is:

  <text:p text:style-name="Heading 5">New heading 5</text:p>


So ...

So perhaps openoffice-writer2forrest.xsl should reconsider how it matches headings. Instead of the current:

  <xsl:template match="text:h[@text:level='1']">

maybe it should match text:h or text:p with an attribute text:style-name="Heading 1" etc.

(Hopefully I will work out how to attach the .sxw and .xml files so you can see these examples easily)
There appears to be a bug or feature in OpenOffice which affects how haedings are stored as XML. It appears that if a virgin document is opened then all headings are stored in <text:h> tags, but if an existing document is opened that lacks a particular haeding style, then if you create that heading style it is stored in <text:p> tags.

This causes Forrest to mis-interpret headings, as the Forrest OOo XSL file identifies OOo headings by looking for the <text:h> tags.

(Moved detail from Description to Comment - see 2005-12-24)
Other Info [Patch available]
Cyriaque Dupoirieux made changes - 12/Oct/06 06:56 AM
Attachment headings.zip [ 12310251 ]
Cyriaque Dupoirieux made changes - 12/Oct/06 06:56 AM
Attachment openoffice-writer.sxw [ 12310280 ]
Cyriaque Dupoirieux made changes - 12/Oct/06 06:57 AM
Attachment openoffice-writer.sxw [ 12310277 ]
Cyriaque Dupoirieux made changes - 12/Oct/06 06:57 AM
Attachment openoffice-writer2forrest.xsl [ 12310276 ]
Cyriaque Dupoirieux made changes - 12/Oct/06 06:57 AM
Attachment openoffice-writer_clay.diff [ 12310279 ]
Cyriaque Dupoirieux made changes - 12/Oct/06 06:58 AM
Attachment openoffice-writer_update.sxw [ 12310289 ]
Cyriaque Dupoirieux made changes - 12/Oct/06 06:58 AM
Attachment openoffice-writer2.sxw [ 12342775 ]
Attachment openoffice-writer.sxw [ 12342774 ]
Attachment headings.zip [ 12342773 ]
Cyriaque Dupoirieux made changes - 12/Oct/06 06:59 AM
Attachment openoffice-writer_update.sxw [ 12342778 ]
Attachment openoffice-writer2forrest.xsl [ 12342776 ]
Attachment openoffice-writer_clay.diff [ 12342777 ]