• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

auto-indent

 
oLi Bou
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
U can try using this.
<xslutput method="xml" indent="yes"/>
Regards
Balaji
 
oLi Bou
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic