forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gavin" <>
Subject RE: ODT template file (Was: Use of 3rd party template)
Date Fri, 03 Oct 2008 05:56:42 GMT

> -----Original Message-----
> From: Sjur Moshagen []
> Sent: Friday, 3 October 2008 3:22 PM
> To:
> Subject: ODT template file (Was: Use of 3rd party template)
> Den 26. sep. 2008 kl. 14.23 skrev Gavin:
> > I have an OSSWatch ODT file to be used as a template to use for our
> > OOo
> > output plugin. Can I get appropriate permissions to use the contents
> > of
> > this file ?
> Where did you put this file? I'm not able to find it.
> $ find . -name "*.odt"
> only gives:
> ./whiteboard/plugins/org.apache.forrest.plugin.input.odt
> ./whiteboard/plugins/org.apache.forrest.plugin.input.odt/src/
> documentation/content/xdocs/samples/opendocument-writer.odt

Hi Sjur, 

The 'contents' of the template which was approved I have used are the
background image and styles which make up the final look and feel of the
output odt file. So all this is in the odt output resources directories and
is brought in to use with the xdoc-to-odt.xsl.

> I hoped it would be possible to override the styles and template by
> just adding a properly named odt template file in my project tree, but
> this is not the way it works, no?

No, not currently, that would be nice to do and I can think of various ways
in which we can move forward along that goal.

Currently though to get it to work for you you'll need as a minimum to alter
the contents in the 'include_content.xml 'include_styles.xml' to suit you
(probably just by expanding your odt template file and replacing them
directly with their equivalents.) You'll also need to replace or remove the
currently hard coded background image in the xdoc-to-odt.xsl file :-

  <!-- Add default background image -->
          <!-- FIXME: Would like to use project images dir, how to configure
for that ? -->

So, stick another images in resources/images/ and reference that, or comment
it out altogether. Apart from the above minor changes you are good to go,
bear in mind that the odt output plugin is not yet complete and so there
will be a few issues no doubt to solve at some stage.

For the future -- and I'm happy to work with you on this, it would be nice
to instead have the xdoc-to-odt.xsl reference either a template file or a
directory which contains different styles -- in the same way as themes are
referenced using either /common/ or /pelt/ etc...
Depends which you think is easier, possibly dropping a templateName.odt file
in somewhere and configure it in the local file.
The last idea would be much easier for the user, but for us to make it
happen, probably harder as I don't know how to go about it, would need input
from others.

Like I say, happy to work with you on it as I know the current
implementation is restrictive, but I'm on an agenda. So if you can take the
lead on it I'll jump in where I can.



> Best regards,
> Sjur
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 270.6.21 - Release Date: 9/11/2008
> 12:00 AM

View raw message