Re: Apache FOP and & in strings
Re: Apache FOP and & in strings
- Subject: Re: Apache FOP and & in strings
- From: Jean-François Veillette <email@hidden>
- Date: Wed, 6 Jun 2007 08:52:52 -0400
Before sending the xsl-fo stream to FOP, can you save it and analyse
it independently ?
I would be interested to see the fo stream that is causing problem.
Once we can identify the xsl-fo problem, we will know what we should
generate from webobjets.
- jfv
Le 07-06-05 à 08:35, WO Dev a écrit :
Hello Jean-François,
Actually if I try to escape the &, it displays the "&" inside
the pdf like "me & you" ... So it doesn't work:(
Xavier
Here is a method that 'escape' some chars.
We call this method before inserting a string (comming from an eo
attribute for example) into a fo-xml stream.
static public String transformeCaracteresSpeciaux(String chaine) {
if (chaine != null) {
String uneSt = chaine.replaceAll("&", "&");
uneSt = uneSt.replaceAll("\"", """);
uneSt = uneSt.replaceAll("<", "<");
uneSt = uneSt.replaceAll(">", ">");
return uneSt;
}
return chaine;
}
- jfv
Le 07-06-05 à 04:49, WO Dev a écrit :
Hello,
I couldn't find the answer on the FOP archives, so I'm posting to
this list as some of you know FOP (a lot better than me;))
I'm trying to figure out how to make a pdf using FOP...
Well actually I think I'm pretty close, but I don't even know how
it looks like as there's still one crash:
I have some text with & inside, so I was able to make them to
work by using <![CDATA[my_string]]>.
But I also have some images with a & in their names like:
<fo:external-graphic src="url(/Path/1&2.jpg)"/>
So FOP crash on that...
I can't change the name of the images, how can I make FOP to work
with this name?
Thanks for your help
Xavier
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden