xslt1.0 replace is not working

后端 未结 1 742
悲&欢浪女
悲&欢浪女 2021-01-25 09:52

I have URLs with some special characters and i would like to replace them and I am using xslt 1.0 so I am writing the code as below.



        
1条回答
  •  孤街浪徒
    2021-01-25 10:17

    The provided "replace" template is working.

    To confirm this use the following transformation:

    
        
    
        
            
                
                    
                    '
                    
                
            
    
            ""
        
    
        
            
            
            
            
                
                    
                    
                    
                        
                        
                        
                    
                
                
                    
                
            
        
    
    

    when the transformation is applied on this XML document:

    
    

    the wanted, correct result is produced:

    "Abc%27Xyz%27Tuv"
    

    The problem may be in the way you specify the replace parameter (uneven number of apostrophes in the expression):

    Instead of:

    
    

    Use:

    '
    

    0 讨论(0)
提交回复
热议问题