IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Output escaping to HTML and PDF Options · View
mdichi
Posted: Friday, October 14, 2016 6:39:34 AM
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="'&lt;fo:inline font-weight=&quot;bold&quot;&gt;Hello World&lt;/fo:inline&gt;'"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="'&lt;b&gt;Hello World&lt;/b&gt;'"/>
        </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.
mdichi
Posted: Saturday, October 15, 2016 12:12:35 AM
Rank: Newbie

Joined: 4/5/2016
Posts: 5
Any thoughts on this, please?
mdichi
Posted: Saturday, October 22, 2016 1:21:42 AM
Rank: Newbie

Joined: 4/5/2016
Posts: 5
Anyone from Altova care to comment or should I assume this is a bug?
vlad
Posted: Saturday, October 22, 2016 8:56:32 AM
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.
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.