[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: how to keep big integer format?
formatting the number may get you a bit further, but eventually you'll get to a range where adding 1 doesn't change the value (as a double) try <object_id>1111111111111111111</object_id> for example. If you are using xslt you can use the xs:integer type for integers. <xsl:template match="blueprint"> : <xsl:value-of select="1+marker_object/object_id"/> : <xsl:value-of select="format-number(1+marker_object/object_id,'#0')"/> : <xsl:value-of select="1+xs:integer(marker_object/object_id)"/> </xsl:template> makes $ saxon8 int.xml int.xsl <?xml version="1.0" encoding="UTF-8"?> : 1.1111111111111112E18 : 1111111111111111168 : 1111111111111111112 for example. In XSLT1 you'd have to work a bit harder, implementing decimal encoded addition using string handling. David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|