[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Converting number to ASCII-character

Subject: RE: Converting number to ASCII-character
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 24 Sep 2001 09:29:29 +0100
number to ascii
> I have a variable, which contains a number and I want to output the
> appropriate
> ASCII- charater. 
> For example
> 
> <xsl:variable name = "number" select = "65"/>
> 
> should output an A.
> Is there a function or something similar to solve this issue ?

The closest equivalent is:
 <xsl:value-of select="concat('&amp;', $number, ';')"
   disable-output-escaping="yes"/>
which works because Unicode character values are a superset of ASCII.

If you want to avoid d-o-e, you can
(a) escape into an extension function
(b) use

<xsl:variable name="ascii"> !&quot;#$%^....abcde...ABCDE....</xsl:variable>
<xsl:value-of select="substring($ascii, $number - 31, 1)"/>

Mike Kay

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.