|
Rank: Newbie
Joined: 4/5/2016 Posts: 5
|
I have some dynamically generated text that is formatted with HTML using just BOLD (<b>) tags. I've written some XSLT to convert the bold tags to the FO equivalent (<fo:inline font-weight='bold'></fo:inline>). I escape the converted text through using SV_OutputFormat for the appropriate format (HTML or FO/PDF). It doesn't seem to work.
Here is a simple User Defined Block that demonstrates the problem.
Code:<xsl:variable name="test"> <xsl:choose> <xsl:when test="$SV_OutputFormat = 'PDF'"> <xsl:value-of select="'<fo:inline font-weight="bold">Hello World</fo:inline>'"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="'<b>Hello World</b>'"/> </xsl:otherwise> </xsl:choose> </xsl:variable>
<xsl:value-of select="$test" disable-output-escaping="yes"/>
This last line correctly displays text as bold in HTML. However, it doesn't show bold text in PDF. Instead it shows the FO markup in the PDF, like this: <fo:inline font-weight="bold">Hello World</fo:inline>
Is it possible to escape FO through to PDF? If so, why doesn't this work?
Thanks.
|
|
Rank: Newbie
Joined: 4/5/2016 Posts: 5
|
Any thoughts on this, please?
|
|
Rank: Newbie
Joined: 4/5/2016 Posts: 5
|
Anyone from Altova care to comment or should I assume this is a bug?
|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
I don't think it is a bug, because I don't think that output escaping was ever meant for FO - only for HTML.
I'm pretty sure you've seen the text above, that this is not a support but user forum, and you should contact Altova Support if you want their answer.
|
|
guest |