Check if a string is null or empty in XSLT

前端 未结 14 1215
梦毁少年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 10:02

    Absent of any other information, I'll assume the following XML:

    
        
            item 1
            blue
        
        
            item 2
            
        
        
            item 3
        
        ...
    
    

    A sample use case would look like:

    
        
            
        
        
            
        
        
            
        
        
            
        
    
    

提交回复
热议问题