Subject: RE: special characters decimal code display
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 18 Nov 2005 09:12:20 -0000
|
Preferably, redesign your input. When a "<" represents markup, it's best not
to pretend it doesn't, which is what you are doing by escaping it as <.
If you can't do that, you might be able to dig yourself out of the hole
using disable-output-escaping.
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Mingqiang Yu [mailto:myu@xxxxxxxx]
> Sent: 18 November 2005 05:09
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: special characters decimal code display
>
> Hi,
>
> This is part of my xml file. As you can see that, all the special
> characters are encoded using their decimal codes. But when I
> output them
> in the stylesheet using <xsl:value-of select="."/>, all
> special characters
> are converted to their entity format. For example, < is
> converted to
> <, > is converted to >, etc. But what I need is to convert
> "<sup>&plusmn;</sup>" to
> "<sup>±</sup>"
> so the stylesheet can display them correctly. Can anyone help on this
> issue? Many thanks. -Ming
>
> ********************************************
> <title item='1'
> db='sny'>On the direct decays K<sup>&#
> 38;plusmn;</sup
> >&rarr;&pi;<sup>&plusmn;&#
> 60;/sup>+&gamma;+&#
> 38;gamma;, K<sup>&plusmn;</
> ;sup>&rarr;&pi;<sup
> >&plusmn;</sup>+&gamma;
> 3;e<sup>+</sup>+
> ;e<sup>-</sup> and K<sup&#
> 62;&plusmn;</sup>&r
> arr;&pi;<sup>&plusmn;</sup
> >+e<sup>+</sup&
> #62;+e<sup>-</sup></title>
|