Link to home
Start Free TrialLog in
Avatar of sturdy
sturdyFlag for Norway

asked on

How do I convert entities?

Hello
I have an application where I'm storing the information in XML.
In the data is there a lot of text, and special characters.
I'm thinking about storing all special characters (it's a defined set) as unicode, using entities when loading the data. (for exs. ꪻ)
The import of data is no problem, the problem is when I'm extrating the data (using stylesheet). How do I convert the special characters to other things, for example bitmaps (for web) or decimal numbers for rtf, or font tags for other applications?
I need a stylesheet that are able to convert the unicode characters to "other things"

I do of corse, just for the thrill of it, having clients using both Windows 95, Mac and NT 4.0 and 2000, so Unicode is not supported on all client...
ASKER CERTIFIED SOLUTION
Avatar of PeterCiuffetti
PeterCiuffetti
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I see in my post that the Experts Exchange database mangled my unicode during the submission.
The tests originally had greek characters in them.  Another way to deal with this is to use unicode escape sequences but these are less readable:

   <xsl:when test="$char1 = '&#x0394;'"><img src="images/delta.gif" border="0"/></xsl:when>
   <xsl:when test="$char1 = '&#x03A8;'"><img src="images/psi.gif" border="0"/></xsl:when>
   <xsl:when test="$char1 = '&#x03A9;'"><img src="images/omega.gif" border="0"/></xsl:when>


Avatar of sturdy

ASKER

Thanks very much...
Avatar of sturdy

ASKER

I tought I had accepted this long ago. Sorry that you had to wait.