forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Palmer" <>
Subject Re: Problem using 'Forrest:Source' style
Date Sat, 11 Sep 2004 11:14:12 GMT
Hi Clay

I suspect it is a combination of two things: how the lines are terminated in
your original source code,and then how the openoffice-writer2forrest.xsl
style sheet processes these line endings.

Have a look at the content of your OOo document (you can do this by
unzipping the .sxw file and examining the XML in content.xml). The source
box example in Forrest's seed site looks like this:

  <text:p text:style-name="Forrest: Source">// source code:

In the OOo document I made a copy of this and added a "carriage return" at
the end of the first two lines. In the OOo document the modified code stayed
within a single source box, but the page rendered by Forrest ended up with
three individual source boxes, as you report. The modified OOo document
contains this:

  <text:p text:style-name="Forrest: Source">// source code:
  <text:p text:style-name="Forrest: Source"><text:line-break/>import
  <text:p text:style-name="Forrest: Source">...</text:p>

So in the modified case we end up with three "paragraphs" in the
"Forrest:source" style, which Forrest puts into individual boxes, (while OOo
recognises that they should be kept within one).

Maybe some XSL guru can devise a fix.


1    The same problem occurs with the Forrest:warning, Forrest:note and
Forrest:fixme styles. Presumably the same fix will fix all four boxes.

2    The Forrest:warning, Forrest:note and Forrest:fixme styles should be
modified so change the "Next style" attribute from "default" to
Forrest:warning, Forrest:note and Forrest:fixme respectively. (Currently you
drop out to default style when you hit return).

3    Text in styles "Heading 6" through to "Heading 10" are not rendered at
all. You might argue that no one want tens levels of headings, but actually
I am using headings 1-5 in the body of my documents and headings 6-10 in the
appendices (for outline numbering purposes), so XSL code to render all 10
would be good.

Sorry I am not good enough with XSL to do the fixes myself, but hope the
report is of use :-)

Charles Palmer

----- Original Message -----
From: "Clay Leeds" <>
To: <>
Sent: Friday, September 10, 2004 11:11 PM
Subject: Problem using 'Forrest:Source' style

> This may be a question.
> I'm having problems applying the Forrest:Source style to ~20 lines of
> 'source' text. I'm actually trying to display the "Usage" for the
> command line interface of a java program (similar to running /forrest
> -projecthelp/). I've selected the lines of text and applied the
> paragraph style 'Forrest: Source'. After running /forrest/, the html
> page shows each line in its own 'source' box (with a border around each
> line), instead of having one box with all lines in it.
> Any ideas?
> Web Maestro Clay

View raw message