Forcing a decimal point on the first digit
Posted on 2004-11-16
Ok i have a xml file and a xsl file.
I have managed to display all the data the way i wanted with one exception.
The xml file as a numeric value of a north south west east designation by numbers.
south and west would be a negative number and a north east would be a postive number.
I can get the numbers to show correctly to a point.
As all coordinates have a decimal point in reality.
Though the xml file only gives a whole number.
Here are the two lines of code i am talking about
First this is from the xml file.
<location NS="575" WE="-528">
This is the lines of code in the xsl file to give the proper view im looking for.
<td bgcolor="#ffffff"><xsl:value-of select="format-number(number(location/@NS),'#,N;#,S')" /></td>
<td bgcolor="#ffffff"><xsl:value-of select="format-number(number(location/@WE),'#,E;#,W')" /> </td>
What will show when you look at the html view will be
What im looking for is 57.5N 52.8W so im looking for a solution on how to force a decimal point one digit over.
Mind you i am more then a beginner at this meaning i have no training what so ever in xml or xsl
So please be specfic in what you say to me as so i can understand what you are telling me.