| date: | 2006-03-20 15:41:39 |
|---|---|
| category: | DocBook |
I’ve been using the Apache FOP [link ] to transform XSL:FO into PDF’s. FOP works well enough for some DocBook processing, but it can’t handle really complex stuff gracefully.
Can we also use this XSL:FO technology for producing PDF form letters as part of a Customer Relationship Management solution? Is FOP suitable?
XSL:FO Products
A very complete list is available at XMLSoftware.com [link ].
The core list of tools include the following:
A nice comparison between the market-leaders XEP and XSL Formatter is available at XSLT.com [link ].
Beyond these tools, Altova has a product [link ] to help design the XSL that controls document production.
Finally, a partial solution is iText [link ], which is a set of Java libraries that create PDF’s.
Personally, I would prefer to use something like ReportLab Toolkit [link ], but the customer will likely balk at anything non-Java. Indeed, between Python, Cheetah and ReportLab, I think I’d be done with a solution, rather than still studying the problem.
Additional Thoughts. The real question, however, is why XSL:FO? There are lots of products that produce PDF files. We have to look at the real purpose behind the task. For converting DocBook files, the stylesheets and XSL:FO components fit into a very nice processing pipeline that is driven by Xalan.
However, in the case of Customer Relationship Management, we are using an application to do “mail-merge” processing, combining a template letter with details extracted from the database. We can imagine two families of architectures for this:
Minimal Markup. In this case, either no markup or a home-brewed minimal markup language are used. This has the advantage of minimizing knowledge of XSL:FO.
Existing Markup. In this case, existing markup languages are leveraged.
Adobe has products that handle all of this, but they can be expensive. The Minimal Markup solutions involve some programming, but it is the kind of inflexible programming that makes every minor change to the template a huge cost and expense. The Existing Markup solutions involve considerable learning, but also mean that letter changes are handled by someone who knows the template language and the XSL:FO markup language.
The knowledge of XSL:FO can be minimized with clever use of the Cheetah or Velocity templates.