Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML-22036: (Error) Cannot convert 0,0E0 to number.

Status
Not open for further replies.

brokenbone

Programmer
Oct 19, 2005
17
SI
Hi,

I have an XSLT transformation that creates degrees minutes and seconds for latitude given in 1/10.000 minutes. I don't need the formula or corrections, don't be scared :).

I have a problem with the line:
Code:
  <xsl:value-of select="format-number($sec, '#.##0,00', 'decimalFormat')"/>

while I calculate the sec varible like this:
Code:
		<xsl:variable name="sec">
			<xsl:value-of select="round(($LongValue - (floor($LongValue div 600000)*600000) - (floor(($LongValue - (floor($LongValue div 600000)*600000)) div 10000)*10000)) div 10000*60)"/>
		</xsl:variable>

and the decimal format looks like this:
Code:
	<xsl:decimal-format name="decimalFormat" decimal-separator="," grouping-separator="."/>

It seems that the calculation of the sec variable returns the value '0,0E0' instead of simple '0' and this leads to the exception.

There is one more thing, the problem only occurs in Java code as while I transform the same XML with the same XSLT in XML editor it works OK.

Anyone has any ideas?

Thank you in advance,
BB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top