forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Bolger" <>
Subject Re: Modifying plugin
Date Wed, 08 Mar 2006 03:30:23 GMT
> "Information loss" is not very accurate, I should have said something
> like "unpredictable behaviour". Here's just one example of such
> unpredictable behaviour:
> Consider a TOC built within OOo. It includes all headings of level 1 or
> 2. If you go from level 1 heading to level 3 heading this will be OK,
> but in Forrest how is this handled? Does it convert
> Heading 1
> blah blah
> Heading 3
> blah blah
> to
> <section>
>    <title>Heading 1</title>
>    <p>blah blah</p>
>    <section>
>      <title>Heading 3</title>
>      <p>blah blah</p>
>    </section>
> </section>
> or to
> <section>
>    <title>Heading 1</title>
>    <p>blah blah</p>
>    <section>
>      <section>
>        <title>Heading 3</title>
>        <p>blah blah</p>
>      </section>
>    </section>
> </section>

I can live with that. The problem here is with the people writing the
docs. I might have to see if I can work out some way of forcing them
to use a logical structure. Beyond switching to a CMS I'm not sure
what the answer is, if people insist on making new styles every time
they want text to look different, and use asterisks to make lists,
it's always going to be a nightmare converting their documents. Might
be a nice add-on for the OO plugin though: a 'heading collapser':
parse the doc after translation and collapse all headings into
sequence. Could have unpredicable effects though. It has occured to me
that what is really required here is a program which can look at a MS
Word doc and go "this is how you intended to format this" from the
visual layout. If anyone's aware of anything like this I'd be
interested :)

> >>Your point about an "arrow graphic" confuses me. I have never seen this,
> >>so it is a specific use in your case. Certainly, the samples, such as
> >>[1], do not exhibit this behaviour. It would be best for us to figure
> >>out why this is happening and improve the stylesheets to prevent it
> >>happening when not expected, as in your case. Can you post the code
> >>snippet you needed to change for this.
> >
> >
> > the relevant line out of the stylesheet (pelt.screen.css) is
> >
> > p.instruction {
> >   display: list-item;
> >   list-style-image: url('../themes/images/instruction_arrow.png');
> >   list-style-position: outside;
> >   margin-left: 2em;
> > }
> OK so the graphic is inserted by the stylesheet, not the OOo. But why is
> your text being marked as an instruction...
> > in
> >
> > openoffice-writer-to-forrest.xsl
> >
> > the code was
> >
> > <!--+
> >       | Instructional step
> >       +-->
> >   <xsl:template match="text:p[@text:style-name='P2']">
> >     <p class="instruction">
> >       <xsl:apply-templates/>
> >     </p>
> >   </xsl:template>
> > </xsl:stylesheet>
> Ahhh...
> P2 is defined in the SXW How-To template as an instruction. This is
> clumsy, it should be a named style not an OOo defiend style (which is
> P2). We need to change the How-To template document

sorry, you've lost me here - the How-To template?

to provide a named
> style for this and leave the OOo defined style names unnafected by the
> OOo stylesheet since we have no control over how they are defined.
> > beats me why it's being triggered by this specific document. The doc
> > in question originated in MS Word and was translated to sxw by OO 2.0,
> > and the problem happened across a few docs I was referencing.
> Just coincindence that some internal MS style has been converted to "P2"
> in the OOo docs. The above should fix this.

Yes, see above. As stated I'm not that worried about the output being
that slick, I just need this to work easily, and the html is about
%1000 better than I'd get if I used MS html generation. I figure I can
attempt to educate the authors (with some tips on the section index
pages) and hope they get the message.

View raw message