Getting a substring AFTER the last occurrence of a character in XSLT

后端 未结 3 1171
悲&欢浪女
悲&欢浪女 2021-01-02 07:26

I have a string in an XML file that looks similar to this:

M:Namespace.Class.Method(Something a, Something b)

The number of peri

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-02 08:05

    In XSLT 1.0 you will need to use a recursive template, like this:

      
        
        
        
          
            
              
              
            
          
          
        
      
    

    and invoke it like this:

    
      
      
    
    

    In XSLT 2.0, you can use the tokenize() function and simply select the last item in the sequence:

    tokenize('M:Namespace.Class.Method(Something a, Something b)','\.')[last()]
    

提交回复
热议问题