• 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: Tue, 5 Jun 2007 06:49:15 -0400

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:
email@hidden


This email sent to email@hidden

_______________________________________________ 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
  • Follow-Ups:
    • Re: Apache FOP and & in strings
      • From: WO Dev <email@hidden>
References: 
 >Apache FOP and & in strings (From: WO Dev <email@hidden>)

  • Prev by Date: Re: Primary Key Generation with MySQL and EOF?
  • Next by Date: Re: Apache FOP and & in strings
  • Previous by thread: Apache FOP and & in strings
  • Next by thread: Re: Apache FOP and & in strings
  • Index(es):
    • Date
    • Thread