Apache FOP: generating valid xml:fo

L

lorna.mitchell

I hope I'm not repeating a question or missing any good resources but I
really can't figure out the best way to progress with my problem. We'd
like to use apache fop to generate documents in both PDF and PCL format
- our email system will only take PDF and the fax system only PCL,
Apache FOP is spot on for this. However it is choking on whatever I
feed it, I think because not all the tags have been implemented.

Can anyone recommend me a good way of feeding a document in to FOP
other than by crafting the xml:fo myself in a text editor? We might
need "normal" people to make documents to go through this process, and
we will need tables. I've seen some XSLT for XHTML to xml:fo but of
course they don't take account of the fact that not all of the xml:fo
standard has been implemented.

Suggestions, pointers, and any other snippets or ideas would be most
welcome - and if I should be writing this xml file myself, then tell me
and I'll get started!

Thanks everyone

Lorna
 
J

Joe Kesselman

Can anyone recommend me a good way of feeding a document in to FOP
other than by crafting the xml:fo myself in a text editor?

As you said, XSLT stylesheets are the most common way to produce XSL:FO
(that's what they were originally designed for, after all). If FOP
doesn't support some features, the fastest solution may be to simplify
one of the existing stylesheets rather than reconstructing the behaviors
from the ground up. I suspect that if you ask on Apache's mailing list
for FOP, you'll find at least one source for already-modified versions...
 
A

Andy Dingley

Joe said:
As you said, XSLT stylesheets are the most common way to produce XSL:FO
(that's what they were originally designed for, after all).

Are they? As a casual matter of historical curiosity, just what was
the sequencing between XSLT and XSL:FO ? Were they conceived as a
pair, or did one pre-date the other?
 
J

Joe Kesselman

Andy Dingley said:
Are they? As a casual matter of historical curiosity, just what was
the sequencing between XSLT and XSL:FO ? Were they conceived as a
pair, or did one pre-date the other?

As a pair. See info on the W3C's website.
 
?

=?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=

I hope I'm not repeating a question or missing any good resources but I
really can't figure out the best way to progress with my problem. We'd
like to use apache fop to generate documents in both PDF and PCL format
- our email system will only take PDF and the fax system only PCL,
Apache FOP is spot on for this. However it is choking on whatever I
feed it, I think because not all the tags have been implemented.

Can anyone recommend me a good way of feeding a document in to FOP
other than by crafting the xml:fo myself in a text editor? We might
need "normal" people to make documents to go through this process, and
we will need tables. I've seen some XSLT for XHTML to xml:fo but of
course they don't take account of the fact that not all of the xml:fo
standard has been implemented.

Feeding XML and XSL to an XSLT process to generate XSL:FO is a good way
to automatically obtain FO without having to manually tag FO.

What is your original input? Are you using XML?

One thing is certain, If you are using FOP, you will have to go around
some of the application's FO tag limitations when you code your XSL
stylesheet. If you are only dealing mostly with text and tables then
PDF generation shouln't be too much of an issue (although you might
have to come up with a few programming tricks to work with table
alignment).

If the idea is to have "normal" people author a document in a regular
"word" format lookalike to then somehow have FOP convert to PDF
thereafter, you will have to think of the intermediary transformation
from text edit to XSL:FO. Are you building a custom application or is
this for personnal use? You might be looking at an XML editor that
outputs, for display, text and formatting for normal users to use. XML
which then would have to be transformed into XSL:FO with the help of
XSL which would then be fed to FOP for PDF creation.

If this if for personnal use, there are some available off the shelf
softwares that take in regular Word documents and convert them directly
to PDF; in which case you would be getting the full editing power of
word and the full flexibility of distribution of PDF.

<endrant/> :)

So the important question is. In what context will you be using the
application stream in?

Regards
Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top