File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes auto-indent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "auto-indent" Watch "auto-indent" New topic
Author

auto-indent

oLi Bou
Greenhorn

Joined: Jul 03, 2002
Posts: 23
hi all,
I'd like to auto-indent some xml code while rendering it to PDF (using FOP).
i thought about using whitespaces ( , , ) to do it but it doesn't seems to work ... does anyone have another idea ?
thx.


--learn every day--
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Hi,
U can try using this.
<xslutput method="xml" indent="yes"/>
Regards
Balaji


Spritle Software Blogs
oLi Bou
Greenhorn

Joined: Jul 03, 2002
Posts: 23
it's not really a good solution ...
but i've got another one, which seems to be able to work : using <fo:block white-space-collapse="false">
but then i need to have my fo to look like this

but it isn't really like this, sadly ...
when I've got my xml code

and my stylesheet code

it renders it in my fo more like

do you have some suggestion to get my fo to look great ?
thx
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Unfortunately No!
but i think u can give a try with xsl:text where u can force white space etc.,
If u have mike kay book,plz give a read on page no 301.
Hmmm... Not a good reply from me.
Regards
Balaji
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: auto-indent