I’m struggling to get an ampersand (“&”) outputting correctly with FOP. It 
always comes out as “&”

I want to render the text 

Cat & Mouse

The source is a XML file, which contains:

<text>Cat &mp; Mouse</text>

(This is an XML file, so the “&” has to be escaped to “&amp;” for the file to 
be valid)

My XSLT transforms this into:

<fo:block>Cat &amp; Mouse</fo:block>

(This is still an XML file, so the “&” still has to be “&amp;” for it to be 
valid)

And FOP renders it as:

Cat &amp; Mouse.

My googling hasn’t been very successful. The FOP FAQ just says to escape the 
“&” (Which I’ve done!) The best suggestion I found was to enclose the initial 
“&” in a <![CDATA[]]> 

What am I missing? I’ve tried both FOP 1.1 & FOP 2.0

Thanks,

GTG
-- 
Gordon Ross

Reply via email to