How to create a boolean value?

前端 未结 3 852
春和景丽
春和景丽 2020-12-12 19:57

I am totally new to XSLT and can\'t work out where I am going wrong with the following code.

         


        
3条回答
  •  执念已碎
    2020-12-12 20:45

    The boolean() function you are using is indeed doing it's job. For using explicit true and false values you should use the following functions:

    
    
    

    Just FYI, per the MSDN documentation, boolean() returns the following:

    • If the argument is a negative or positive number, it is converted to the Boolean value true.
    • If the argument is zero or an NaN value, it is converted to false.
    • If the argument is a non-empty node-set, it is converted to true. An empty node-set is converted to false.
    • If the argument is a non-empty string, it is converted to true. An empty string is converted to false.
    • If the argument is an object of a type other than the four basic types, it is converted to a Boolean in a way that is dependent on that type.

提交回复
热议问题