forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clay Leeds <cle...@medata.com>
Subject Re: Problem using OpenOffice.org 'Forrest:Source' style
Date Sat, 11 Sep 2004 16:14:01 GMT
On Sep 11, 2004, at 4:14 AM, Charles Palmer wrote:
> 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.

I suspected a similar thing...

> 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:
> &lt;source&gt;...&lt;/source&gt;<text:line-break/>import
> org.apache.cocoon.*;<text:line-break/>...</text:p>

D'oh! I forgot sxw is an XML format! I could've looked myself (and 
seen--and probably fixed it too!)

> 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:
> &lt;source&gt;...&lt;/source&gt;</text:p>
>   <text:p text:style-name="Forrest: Source"><text:line-break/>import
> org.apache.cocoon.*;<text:line-break/></text:p>
>   <text:p text:style-name="Forrest: Source">...</text:p>

Haven't looked yet... (I'm going to the beach this morning! :-D). But 
I'll check it out later...

> 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.

I'll see what I can do... (Not saying I'm the XSL guru (!), but I may 
have some ideas)...

> THREE FURTHER POINTS:
>
> 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).

I also noticed that in the XSL-FO the Warning & Note have a ":" colon 
at the end that aren't needed.

> 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

Thanks for checking into it! Your help is appreciated!

Web Maestro Clay


Mime
View raw message