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 April 15th, 2014, 05:18 PM
Registered User
 
Join Date: Jul 2013
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Question Xslt -- Value either too large or small for int32

Hi All,

I am trying to do a dblookup from custom xslt(Biztalk Maps) and assigning to variable, value from ScriptNS0:DBValueExtract.

But it's giving an error ScriptNS0:DBValueExtract has failed. Value was either too large or too small for an int32.

I tried using 'as=xs:decimal' but unable to compile the map, Is there a way to explicitly convert the default variable type int32 to decimal or double.

I am using xslt 1.0.

Any suggestion,

Thanks
 
Old April 15th, 2014, 05:26 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Your question probably needs someone who knows Biztalk to answer it, it's not a generic XSLT question.

You can't use attributes like as="xs:decimal" in XSLT 1.0, this is a 2.0 feature.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old April 15th, 2014, 05:34 PM
Registered User
 
Join Date: Jul 2013
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Question

Thanks Michael,

I would like to know in xslt 1.0 what is default type of variable and how change to double or decimal.

Is there a way to store '33.000' in the variable for xslt 1.0

Thanks
 
Old April 15th, 2014, 05:52 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XSLT 1.0 has four data types: string, double, boolean, and node-set. Variables do not have a type, only values have a type. A value written as 33.000 is a double. I would think the message about int32 is something to do with passing values between XSLT and some other language.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old April 16th, 2014, 04:01 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

The error "Value was either too large or too small for an Int32" is exactly the error you get when calling int.Parse in .Net code and try to parse something bigger than int.MAXVALUE (which I'm guessing your Biztalk extension method is written in). So this isn't an XSLT issue, but something in your code that is assuming one of the fields in your database is an INT but is probably a BIGINT.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
The Following User Says Thank You to samjudson For This Useful Post:
krishk189 (April 16th, 2014)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Split large XML to Smaller XML using XSLT chilly XSLT 30 March 8th, 2013 09:43 AM
Summing large numbers in xslt mrkensr XSLT 4 January 5th, 2013 11:53 AM
Not able to display a Large Image in relatively small picture box RK .NET Framework 1.x 0 January 14th, 2009 06:49 AM
Generic & Dynamic XSLT but small problem..help pulin XSLT 3 April 29th, 2007 05:42 PM
Int32 or Integer that is the question Duncan VS.NET 2002/2003 3 May 1st, 2004 08:40 AM





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