Preserving entities?

D

D. Alvarado

Hi,
I cannot seem to preserve my XML entities when I transform to HTML.
For example, I want to transform a document containing

ā

and I would like that exact string to appear in
the resulting HTML. Unfortunately, during the
XML -> HTML, the "ā" gets
converted to an actual character. When I tried using

<![CDATA[ā]]>

the following was in the HTML file

&amp;#257;

What is your advice regarding how to preserve
these entities?

Much thanks, - Dave
 
P

Patrick TJ McPhee

% For example, I want to transform a document containing
%
% ā
%
% and I would like that exact string to appear in
% the resulting HTML.

Try adding

encoding='ISO-8859-1'

as an attribute of the xsl:eek:utput element.
 
K

Kenneth Stephen

D. Alvarado said:
Hi,
I cannot seem to preserve my XML entities when I transform to HTML.
For example, I want to transform a document containing

ā

and I would like that exact string to appear in
the resulting HTML. Unfortunately, during the
XML -> HTML, the "ā" gets
converted to an actual character. When I tried using
Dave,

In your xsl:text or xsl:value-of that is actually writing out the value
in question, add the following attribute : disable-output-escaping="yes".

Regards,
Kenneth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top