Check if a string is null or empty in XSLT

前端 未结 14 1163
梦毁少年i
梦毁少年i 2020-11-27 09:12

How can I check if a value is null or empty with XSL?

For example, if categoryName is empty? I\'m using a when choosing construct.

For

14条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 09:51

    If there is a possibility that the element does not exist in the XML I would test both that the element is present and that the string-length is greater than zero:

    
        
            
        
        
            
        
    
    

提交回复
热议问题