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 January 8th, 2008, 08:14 PM
Authorized User
 
Join Date: Jun 2007
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default scientific notation

I know XSLT 1.0 didn't support scientific notation, but I am trying to find documentation on how XSLT 2.0 handles it.

Does XSLT 2.0 support converting b/w scientific notation and number?
 
Old January 9th, 2008, 04:29 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XSLT 2.0 enables strings containing numbers in scientific notation to be converted to double-precision floating point numbers simply using the number() function, for example number('1.0e7').

When doubles are converted to strings, e.g string($x+$y), scientific notation is used in XSLT 2.0 if the number is outside the range 1e-6 to 1e+6. There's no way of getting scientific notation for numbers within this range.

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
ENTITY AND NOTATION IN XSLT mrame XSLT 5 July 29th, 2008 04:28 PM
Scientific calculator NEO1976 Flash (all versions) 2 November 28th, 2007 10:59 AM
warning from dotted notation in resource key Linden BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 19th, 2007 03:58 PM
Problem with fieldname dot notation apt566 ASP.NET 1.0 and 1.1 Basics 1 December 3rd, 2005 11:01 AM
Thousands and Decimals - Notation fskilnik Dreamweaver (all versions) 3 October 4th, 2005 02:35 PM





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