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 July 31st, 2007, 07:05 AM
Registered User
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hexadecimal Addition

Hi All,

I would like to know how to add two Hexadecimal values in XSLT,

For eg: 09 + 0A = 13

Thank you in advance,


Old July 31st, 2007, 07:21 AM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

There's no intrinsic support for this, you'll either have to call an extension function in Java/Javascript etc, or code it up for yourself. It's not too difficult, you can start with

string-length(substring-before("0123456789ABCDEF", $x)), which converts a hex digit in $x to its decimal value.

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Similar Threads
Thread Thread Starter Forum Replies Last Post
Addition of Textboxes rhd110 General .NET 3 June 23rd, 2007 04:49 PM
Addition in javascript m_soni21 VBScript 2 December 19th, 2006 11:06 AM
addition to errata luciano991 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 August 25th, 2006 08:29 PM
Syntax for Hexadecimal NCRs ? RICHBIRD XSLT 12 June 28th, 2006 11:32 AM
Hexadecimal numbers in MS SQL Server 7 notChavez SQL Server 2000 3 June 19th, 2003 08:07 PM

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