I am trying to generate an HTML document with XSLT that can contain a numeric character reference in the output. I n many cases, the XSLT works with 'normal' characters, e.g., non-breaking space character (Š), etc., since all browsers can successfully interpret them when they are output as literal values.
However, my documents contain certain characters that lie outside the normal Basic Multilingual Plane. When XSLT transforms these as literal characters, many browsers have trouble interpreting them, even though the font called out in the CSS does contain a glyph for the applicable codepoint. Consequently, for these special characters, I need to generate a numeric character reference in order to ensure satisfactorily rendered HTML.
My current method for outputting the character is using <xsl:text>, e.g.,
Code: Select all
How do I guarantee that the numeric character reference is output instead of the literal value?
I am using OxygenXML 17.1 on Windows 7 (64-bit). My stylesheets are XSLT v2.0.