RE: [xsl] Is there a way to utilise disable-output-escaping in apply-templates?

Subject: RE: [xsl] Is there a way to utilise disable-output-escaping in apply-templates?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 14 Sep 2006 14:55:36 +0100
> Thanks for the reply mike. Upon testing, i noticed that
> disable-output-escaping works on like &#160; &#nbsp; while
> failing with likes of &#x2019; And I got more confused
> looking at the html output and view source.

Yes, you got confused.

d-o-e="yes" causes special characters that would normally be escaped
(specifically < and &) to be output as < and & instead of &lt; and &amp;

d-o-e="yes" doesn't affect characters that wouldn't normally be escaped
anyway, or characters that are only being escaped because there's no other way
to represent them in the chosen output encoding.

>
> My q's are:
> 1) I wish to know how to escape those 2019, 2018's etc
> without them converting into single quotes ('s). In the
> sense, I am expecting to get an output -
> &#x2018;abnormality&#x2019; as in XML and not babnormalityb

use an encoding in which they can't be represented natively, e.g. <xsl:output
encoding="iso-9959-1"/>
>
> 2) On the browser, This publication  'ab' babnormalityb is
> seen as ...publication 'ab' C"b,KabnormalityC"b,b" Why b is
> dipslayed as C"b,K?

Because your browser or your web server or something is misconfigured. The
document is encoded in UTF-8 and for some reason the browser isn't recognizing
it as such.

Michael Kay
http://www.saxonica.com/

Current Thread