Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2005, 09:59 AM
Registered User
 
Join Date: Oct 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to bluetorch
Default ascii code in my XSLT

i need to output letters using the position() function

i need the syntax to output an "A" using the ascii number value

for example:

ascifunction(x + position())

where x is the number of the letter "A" minus 1

 
Old October 28th, 2005, 01:23 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XML uses Unicode, not ASCII.

You can't get the Unicode code for a character in XSLT 1.0. In 2.0 you can use the functions string-to-codepoints() and codepoints-to-string(). Alternatively your needs may be met by <xsl:number value="position()" format="A"/>.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Ascii code for a character in XSLT mswin XSLT 8 November 28th, 2008 08:21 AM
ASCII code on keypress event ashokkumar .NET Framework 1.x 9 March 29th, 2007 07:50 AM
Symbol/Ascii Code Problem mic_gel VS.NET 2002/2003 0 January 14th, 2007 06:44 PM
About the Ascii code LTGarrisonUSA C# 3 September 7th, 2004 09:39 PM
URGENT byte associated with the ASCII code shine Javascript How-To 0 July 5th, 2004 09:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.