RE: [xsl] special characters decimal code display

Subject: RE: [xsl] special characters decimal code display
From: "Mingqiang Yu" <myu@xxxxxxxx>
Date: Fri, 18 Nov 2005 08:29:09 -0700 (MST)
Thanks a lot for your help. It works beautifully.

Ming

> 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
> &#60;.
>
> 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: [xsl] 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, &#60; is
>> converted to
>> &lt;, &#62 is converted to &gt;, etc. But what I need is to convert
>> "&#60;sup&#62;&#38;plusmn&#59;&#60;&#47;sup&#62;" to
>> "<sup>&plusmn;</sup>"
>> so the stylesheet can display them correctly. Can anyone help on this
>> issue? Many thanks. -Ming
>>
>> ********************************************
>> <title item='1'
>> db='sny'>On&#32;the&#32;direct&#32;decays&#32;K&#60;sup&#62;&#
>> 38;plusmn&#59;&#60;&#47;sup
>> &#62;&#38;rarr&#59;&#38;pi&#59;&#60;sup&#62;&#38;plusmn&#59;&#
>> 60;&#47;sup&#62;&#43;&#38;gamma&#59;&#43;&#
>> 38;gamma&#59;&#44;&#32;K&#60;sup&#62;&#38;plusmn&#59;&#60;&#47
>> ;sup&#62;&#38;rarr&#59;&#38;pi&#59;&#60;sup
>> &#62;&#38;plusmn&#59;&#60;&#47;sup&#62;&#43;&#38;gamma&#59;&#4
>> 3;e&#60;sup&#62;&#43;&#60;&#47;sup&#62;&#43
>> ;e&#60;sup&#62;&#45;&#60;&#47;sup&#62;&#32;and&#32;K&#60;sup&#
>> 62;&#38;plusmn&#59;&#60;&#47;sup&#62;&#38;r
>> arr&#59;&#38;pi&#59;&#60;sup&#62;&#38;plusmn&#59;&#60;&#47;sup
>> &#62;&#43;e&#60;sup&#62;&#43;&#60;&#47;sup&
>> #62;&#43;e&#60;sup&#62;&#45;&#60;&#47;sup&#62;</title>

Current Thread