Thanks All,

I'm well aware of the XSL solution. We had long discussions about the
subject of using XSL on XML documents. I'd say I'm forced for the time being
to write the pure FO directly through code.

I'd like to know if anyboy actually has some experience with writing FO
through code. I'd also like to know if I can use the FObj and its decendants
(available in the FOP source codebase) to write FO documents and whether or
not this is favored to writing the FO docuemnts, using code also, but as an
ordinary XML document.

Best

-----Original Message-----
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 30, 2002 5:50 PM
To: [EMAIL PROTECTED]
Subject: Re: Building a FO document with FOP


I recommend you don't build XSL:FO through Java code directly. Produce a
simple XML format with just the data in it. Use a XSLT stylesheet
afterwards to convert the XMl to XSL:FO. It sounds like a lot of work,
but you're actually going to save time. For example, if your layout has
to change you have to adjust your Java code, recompile, redeploy. If
you're working with XSLT you can use some external XML tool, and you
just have to switch the stylesheet if something changes in the layout.

The whole idea about XSL (XSLT+XSL:FO) is separation of data/layout. You
will be a lot more flexible that way! Just imagine you want to generate
HTML or SVG instead of XSL:FO. This way, you (only) have to switch
stylesheets. Your way means writing the Java classes that produce the
XML all over again.

> This is not exactly what I mean. I don't have XML data documens, I'm
trying
> to build a pure XSL:FO document through code, not transform an existing
XML
> to FO. It will go like this: 
> Data (from DB) --(Java code)--> FO document --(render with FOP)--> PDF
> 
> Any clue?
> 
> -----Original Message-----
> From: Katiyar, Bhawana [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 30, 2002 5:05 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Building a FO document with FOP
> 
> 
> I guess it is better to build them as XML documents and use xsl:fo to
> transform them to FO documents. It is much easier. You could use the XML
to
> render HTML, RTF or any other format. FOP programming is also much easier,
> as you shift all the java programming burden of building the FO document
to
> FOP. 
> Bhawana
> 
> -----Original Message-----
> From: Ismaeil, Sameh Z [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 30, 2002 10:37 AM
> To: '[EMAIL PROTECTED]'
> Subject: Building a FO document with FOP
> 
> 
> Hello All,
> 
> We are trying to build FO documents through Java code, these documents
will
> be rendered with FOP. I would like to know whether it is recommended to
> build them using the FOP classes that represent FO elements (FONode/FObj
and
> its decendants), or whether it is better to build them as XML docuemnts
and
> use FOP for rendering only.

Cheers,
Jeremias M�rki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Tel. +41 41 317 2020 - Fax +41 41 317 2029
Internet http://www.outline.ch

Reply via email to