Hi,

your XSL-FO snippet [1] is rendered correctly by FOP: "Cat & Mouse".
I suspect something being wrong in your XSLT, so you should look at it closer.
More appropriate list for this is XSLT list (see [2]).

[1] <fo:block>Cat &amp; Mouse</fo:block>
[2] http://www.mulberrytech.com/xsl/xsl-list/


2016-01-21 8:47 GMT+01:00 Gordon Ross <[email protected]>:
> 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



-- 
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to