forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Palmer" <char...@dspdesign.com>
Subject Re: OpenOffice: Who is Hugo?
Date Wed, 18 Aug 2004 08:47:41 GMT
Dave Brondsema wrote:

> I looked at the XML of the file you sent me and it did not have
> text:level="3" on the heading 3 node like it should've.  All the other
> ones did.  I created a new file and it worked fine.

Exactly!

The openoffice-write.sxw file included in the Forrest examples has something
broken with the "Heading 3" style, as do all other openoffice .sxw files
that I created by modifying it. For example, when I take the original
openoffice-write.sxw, cut out all the text and replace it with a sequence of
Heading1 to Heading 5 lines, then examine the resulting content.xml (by
unzipping the sxw file) I get this (note the special treatment for Heading
3):

<text:h text:style-name="Heading 1" text:level="1">Heading 1</text:h>
<text:h text:style-name="Heading 2" text:level="2">Heading 2</text:h>
<text:p text:style-name="Heading 3">Heading 3</text:p>
<text:h text:style-name="Heading 4" text:level="4">Heading 4</text:h>
<text:h text:style-name="Heading 5" text:level="5">Heading 5</text:h>

But if I start a fresh Openoffice file and add the same content I get this:

<text:h text:style-name="Heading 1" text:level="1">Heading 1</text:h>
<text:h text:style-name="Heading 2" text:level="2">Heading 2</text:h>
<text:h text:style-name="Heading 3" text:level="3">Heading 3</text:h>
<text:h text:style-name="Heading 4" text:level="4">Heading 4</text:h>
<text:h text:style-name="Heading 5" text:level="5">Heading 5</text:h>

I don't know why the Heading 3 style within the openoffice-writer.sxw file
is screwed up.

So there are two problems:

1    The Heading 3 style within the openoffice-writer.sxw file (and any
files that you derive from it) is screwed up.

2    The Forrest openoffice .xsl file that transforms openoffice files to
Forrest format doesn't behave gracefully when a heading level is missing
(inserts "hugo" amongst other things").

So when I edited openoffice-writer.sxw to add Heading 3 and Heading 4
styles, the Heading 3 style was treated as a paragraph rather than as a
heading, then the missing Heading 3 level caused screw-ups in the xsl
transformation, introducing "hugo" and other faults.

So could I suggest that:

1    You re-create the openoffice-writer.sxw sample file to fix the Heading
3 style, so that others who follow after me don't fall into the same hole,
and

2    Look to see if the .xsl file can behave more gracefully when heading
levels are missing from the sequence.

Charles





Mime
View raw message