XSLT: Replace single quotes by \'

后端 未结 5 479
梦毁少年i
梦毁少年i 2021-01-20 18:30

I am using XSLT to transform a XML into a html/php file. In this XSLT I replace some tags by php code and now I have to pass attribute values into that php code. My problem

5条回答
  •  再見小時候
    2021-01-20 19:13

    For an XSLT 1.0 solution either write your own recursive solution, or you can use the FXSL template str-map:

    
       
    
       
    
       '
       \
    
       
    
       
         
         
           
           
         
       
    
        
          
    
          
           
          
          
        
    
    

    When applied on the provided XML document:

    
    

    the wanted, correct result is produced:

    test\'xyz
    

提交回复
热议问题