Re: Creating FO DOM directly

2006-09-28 Thread Shubhrata Tewari

Hi,

Is it possible using xslt and xsl:fo to detect a page break? basically I am 
using a for-each, and I want to show some data in the first row

of a page whenever a new page begins.
Any ideas?

shubhrata, India

- Original Message - 
From: Jeremias Maerki [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Wednesday, September 27, 2006 5:21 PM
Subject: Re: Creating FO DOM directly



That may indeed look tempting but it is definitely not recommended
because you'd mix content and layout in your Java code which is the sort
of thing XSL (XSLT + XSL-FO) wants to keep apart. Furthermore, it's
much easier to change an XSLT than to change the Java code if the layout
changes. Finally, FOP does not provide an easy way to instantiate the FO 
tree

manually.

On 27.09.2006 12:43:01 Lars Ivar Igesund wrote:
I need to create PDF from the information contained in some Java objects. 
The
standard way to do this according to the FOP docs, is to create XML from 
the

objects, then transform to XSL-FO using XSLT.

But since there are FO DOM nodes internally in FOP, it seems to me to be 
a
natural alternative to create these nodes directly instead of going via 
XML +

XSLT.

Is this possible, and how would I go about processing the tree?

Regards,
Lars Ivar Igesund




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Creating FO DOM directly

2006-09-27 Thread Lars Ivar Igesund
I need to create PDF from the information contained in some Java objects. The 
standard way to do this according to the FOP docs, is to create XML from the 
objects, then transform to XSL-FO using XSLT.

But since there are FO DOM nodes internally in FOP, it seems to me to be a 
natural alternative to create these nodes directly instead of going via XML + 
XSLT.

Is this possible, and how would I go about processing the tree?

Regards,
Lars Ivar Igesund


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating FO DOM directly

2006-09-27 Thread Glen Mazza

Lars Ivar Igesund wrote:

I need to create PDF from the information contained in some Java objects. The 
standard way to do this according to the FOP docs, is to create XML from the 
objects, then transform to XSL-FO using XSLT.


 



Yes.  Learning XSLT (like Ant) is Time Very Well Spent.

But since there are FO DOM nodes internally in FOP, it seems to me to be a 
natural alternative to create these nodes directly instead of going via XML + 
XSLT.
 



I placed in such an example a few years back into our 
{fop-dist}/examples/ directory, back in my ultra-newbie days.  It's 
quite hideous, but here it is:  [1].  (Unfortunately, with the switch of 
FOP's repository from CVS to SVN, we apparently have lost this deleted 
file, but it remains in our CVS mailing list archives.)


[1] http://marc.theaimsgroup.com/?l=fop-cvsm=106081657102191w=2


Is this possible, and how would I go about processing the tree?

 



See above, but really look at these examples[2] for the XSLT  SAX-based 
way of processing.  This will prove much easier for you.


[2] 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/


Glen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating FO DOM directly

2006-09-27 Thread Lars Ivar Igesund
Glen Mazza gmazza at apache.org writes:

 
 Lars Ivar Igesund wrote:
 
 I need to create PDF from the information contained in some Java objects. 
The 
 standard way to do this according to the FOP docs, is to create XML from the 
 objects, then transform to XSL-FO using XSLT.
 
   
 
 
 Yes.  Learning XSLT (like Ant) is Time Very Well Spent.
 
snip
 Glen
 

Thanks for the reply, I don't have a problem with XSLT (although I think it's 
quite hideous in itself), I'm just of the opinion that going via a whole set of 
xml-documents isn't always the best way :)

Regards,
Lars Ivar Igesund




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating FO DOM directly

2006-09-27 Thread Jeremias Maerki
That may indeed look tempting but it is definitely not recommended
because you'd mix content and layout in your Java code which is the sort
of thing XSL (XSLT + XSL-FO) wants to keep apart. Furthermore, it's
much easier to change an XSLT than to change the Java code if the layout
changes. Finally, FOP does not provide an easy way to instantiate the FO tree
manually.

On 27.09.2006 12:43:01 Lars Ivar Igesund wrote:
 I need to create PDF from the information contained in some Java objects. The 
 standard way to do this according to the FOP docs, is to create XML from the 
 objects, then transform to XSL-FO using XSLT.
 
 But since there are FO DOM nodes internally in FOP, it seems to me to be a 
 natural alternative to create these nodes directly instead of going via XML + 
 XSLT.
 
 Is this possible, and how would I go about processing the tree?
 
 Regards,
 Lars Ivar Igesund



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating FO DOM directly

2006-09-27 Thread Jeremias Maerki

On 27.09.2006 13:15:34 Glen Mazza wrote:
 Lars Ivar Igesund wrote:
 
 I need to create PDF from the information contained in some Java objects. 
 The 
 standard way to do this according to the FOP docs, is to create XML from the 
 objects, then transform to XSL-FO using XSLT.
 
   
 
 
 Yes.  Learning XSLT (like Ant) is Time Very Well Spent.
 
 But since there are FO DOM nodes internally in FOP, it seems to me to be a 
 natural alternative to create these nodes directly instead of going via XML 
 + 
 XSLT.
   
 
 
 I placed in such an example a few years back into our 
 {fop-dist}/examples/ directory, back in my ultra-newbie days.  It's 
 quite hideous, but here it is:  [1].  (Unfortunately, with the switch of 
 FOP's repository from CVS to SVN, we apparently have lost this deleted 
 file, but it remains in our CVS mailing list archives.)

It's still there:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleDOM2PDF.java?view=markup
But I do not recommend this approach.

 [1] http://marc.theaimsgroup.com/?l=fop-cvsm=106081657102191w=2
 
 Is this possible, and how would I go about processing the tree?
 
   
 
 
 See above, but really look at these examples[2] for the XSLT  SAX-based 
 way of processing.  This will prove much easier for you.
 
 [2] 
 http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/
 
 Glen


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]