xsl-list
[Top] [All Lists]

RE: special characters decimal code display

2005-11-18 02:12:20
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(_at_)lanl(_dot_)gov] 
Sent: 18 November 2005 05:09
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>