XSL substring and indexOf

后端 未结 6 1064
说谎
说谎 2021-02-07 00:14

I\'m new to XSLT. I wonder if it is possible to select a substring of an item. I\'m trying to parse an RSS feed. The description value has more text than what I want to show. I\

6条回答
  •  故里飘歌
    2021-02-07 01:03

    The following is the complete example containing both XML and XSLT where substring-before and substring-after are used

    
    
        
            Joe Smith
            Joe Smith
            
    123 Main St, Anycity

    The following is XSLT which changes value of first/last name by separating the value by space so that after applying this XSL the first name element will have value "Joe" and last "Smith".

    
    
    
        
            
        
     
    
        
            
        
     
    
        
            
        
    
       
    

提交回复
热议问题