Document Templating / Report Generation solution?

S P Arif Sahari Wibowo arifsaha-/E1597aS9LQAvxtiuMwx3w at public.gmane.org
Sat Feb 21 23:25:26 UTC 2009


On Fri, 20 Feb 2009, Christopher Browne wrote:
> "procedural" sorts of things (e.g. - opening files, databases, 
> and such),

Thanks for the comment! Yes, it is procedural, but a pretty 
established routine:
  open / connect to database,
  query for the first grouping,
  loop on the first grouping,
    ...
      query for the n grouping,
      loop on the n grouping,
        query for the details,
        loop on the details
        end loop
      end loop
    ...
  end loop
  close database

Basically normal loop for a database report generator. In fact, 
I probably can use most report generator (including 
OpenOffice.org Base) to get the *content* I needed. The problems 
are that I cannot get in the *layout* I needed, and that some 
other report generators cannot produce output to all format I 
need (PDF, HTML, editable MS Word).


> Again, it's not amenable, by itself, to programming things 
> like mail merge or database access - you'd presumably want to 
> write code in some other language that generates DocBook 
> XML/SGML as output.

Ok, docbook will be something different: it is not a layout nor 
template, but more like structured content. So the procedure 
will be as below, right?
  1. A script queries the database according the rules of the 
intended layout.
  2. The script generate a docbook contain the data.
  3. An XSL convert the docbook to intended XML or an 
intermediate XML according to intended layout.
  4. Another converter convert the intermediate XML to final 
non-XML document.

There are several issues with using docbook this way:

  1. The "intended layout" / template definition need to be 
broken into the rules for the docbook generator script and the 
XSL. This complicates changing the "intended layout" / template.
  2. As MS Word .doc files are not XML, the docbook need to be 
converted to something else first. It seems the good candidate 
is to ODF (there is converter to RTF but there will be many 
issues with complex formatting).
  3. Is there any tools, that given an ODF file, can 
automatically generate a XSL from docbook to that ODF layout? If 
not, that's mean I need to learn the ODF specification, and how 
to generate XML for complex formatting in ODF, and how to do it 
using XSL. This sounds to be huge endeavour, definitely sounds 
much more than scripting OpenOffice.org.


Any other idea?

Thanks!

-- 
                              (stephan paul) Arif Sahari Wibowo
    _____  _____  _____  _____
   /____  /____/ /____/ /____
  _____/ /      /    / _____/      http://www.arifsaha.com/
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list