Formatting scientific number representation in xsl

前端 未结 5 780
遇见更好的自我
遇见更好的自我 2020-12-03 19:45

I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981.

fo

5条回答
  •  温柔的废话
    2020-12-03 20:26

    This is based on user357812 answer. But I made it act like a function and handle non-scientific notation

    
        
        
        
        
        
            
                
            
            
                
            
            
                
            
        
    
    

    Usage:

    
        
            
                
            
            
    
    

    This should handle a mix of scientific notation and decimal values.

提交回复
热议问题