Re: Possibility of personalizing OpenOffice documents automatically?
On Tue, May 31, 2005 at 10:03:30AM -0400, Gregory Seidman wrote:
> On Tue, May 31, 2005 at 12:36:51PM +0200, Herv? Piedvache wrote:
> } On Tuesday 31 May 2005 12:08, Lee Braiden wrote:
> } > On Tuesday 31 May 2005 11:06, email@example.com wrote:
> } > > No I want the operators to not be able to modify the original document
> } > > ... And to have only a main administrator of the documents ...
> } > > It's a kind of contact center, where people manage phone calls and for
> } > > each call they will attribute to the customer a status ... and this
> } > > status will produce a postal mail ... to be generated immediatly or by
> } > > batch at the end of the day ... all the mail will be printed and put in
> } > > wrap to be posted !
> } > >
> } > > It's clearer ? ;o)
> } >
> } > The usual way to do this sort of thing would be with a webserver running on
> } > your intranet, which is linked to a database, and keeps a list of your
> } > customers. Staff can then pull up a webpage, click a button, and have the
> } > server generate reports.
> } Yes ... marvelous ... but with what kind of tool do you manage the production
> } of the mail ?
> } Yes It'll be a web application .. no problem for this ... but I want to manage
> } about 100 mail style sheet ... and be able to do the redaction of thoses mail
> } easily ... and then have a system to produce them in file and print them ...
> } So how to do that ?
> An OOo file is a zip file containing XML files. I don't have deep insight
> into the XML schema used, but it is well-documented and with a little
> examination of a sample file I find that it is pretty simple. Importantly,
> simple (same-styled) spans of text in a document show up as actual text
> strings in the XML. It is therefore possible to put in something like
> XXXXX_1_XXXXX in the running text and decompress/find/replace/recompress to
> produce a new file. Note that it is content.xml that you want to modify.
I can confirm that this process is just as simple as described. I'd create the template document, split it into its
component parts on the server and then make changes to content.xml before zipping the whole thing up automagically
and sending it off to the user/printer.
Given the web architecture, I'd suggest doing the templating with XSL transformations on the original content.xml
file. Easy peasy!