Try using &
For example:
<fo:block>Cat &#x026; Mouse</fo:block>
> From: gr...@uis.cam.ac.uk
> To: fop-users@xmlgraphics.apache.org
> Subject: Ampersand in FOP
> Date: Thu, 21 Jan 2016 07:47:33 +0000
> 
> I’m struggling to get an ampersand (“&”) outputting correctly with FOP. It 
> always comes out as “&amp;”
> 
> 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�Т���������������������������������������������������������������������ХF�V�7V'67&�&R�R���âf��W6W'2�V�7V'67&�&T���w&��72�6�R��&pФf�"FF�F����6����G2�R���âf��W6W'2ֆV����w&��72�6�R��&pР
                                          

Reply via email to