Convert exponential format into numeric format in XSLT

旧城冷巷雨未停 提交于 2019-12-08 09:45:49

问题


I have to convert within my XSLT number in exponential format ( i.e: 1,2345E7 ) into numeric ( i.e: 12340000 ). What would the a XSLT function to achieve this.


回答1:


I haven't tried it, but this implementation claims to do what you ask: http://www.orm-designer.com/article/xslt-convert-scientific-notation-to-decimal-number




回答2:


XSLT 2.0 accepts exponential notation for numbers on input, XSLT 1.0 does not. So the answer rather depends which version you are using (I suspect you are using 1.0, because otherwise you wouldn't need to ask for help). On the output side, you can control the format using format-number() with either version.



来源:https://stackoverflow.com/questions/5266879/convert-exponential-format-into-numeric-format-in-xslt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!