• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Apache FOP and & in strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 "&amp;" inside the pdf like "me &amp; 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("&", "&amp;");
			uneSt = uneSt.replaceAll("\"", "&quot;");
			uneSt = uneSt.replaceAll("<", "&lt;");
			uneSt = uneSt.replaceAll(">", "&gt;");
			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
References: 
 >Apache FOP and & in strings (From: WO Dev <email@hidden>)
 >Re: Apache FOP and & in strings (From: Jean-François Veillette <email@hidden>)
 >Re: Apache FOP and & in strings (From: WO Dev <email@hidden>)

  • Prev by Date: Re: D2W and Direct Actions
  • Next by Date: Visual QuickProject Guide
  • Previous by thread: Re: Apache FOP and & in strings
  • Next by thread: Re: Apache FOP and & in strings
  • Index(es):
    • Date
    • Thread