Convert String to Integer in XSLT 1.0

后端 未结 2 1861
忘掉有多难
忘掉有多难 2020-12-29 18:51

I want to convert a string value in xslt to an integer value. I am using xslt 1.0, so i can\'t use those functions supported in xslt 2.0. Please help.

2条回答
  •  再見小時候
    2020-12-29 19:30

    Adding to jelovirt's answer, you can use number() to convert the value to a number, then round(), floor(), or ceiling() to get a whole integer.

    Example

    
     
     
     
     
    

提交回复
热议问题