xslt replace \n with
only in one node?

后端 未结 2 601
礼貌的吻别
礼貌的吻别 2021-01-05 05:41

Hey I have a node which contains a message such as

string1
string 2
sting3

but however when it r

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-05 06:12

    Call this template on the string you want to process:

    
      
      
        
          
          

    Like this (it will work on the current node):

    
      
    
    

    or like this, explicitly passing a parameter:

    
      
        
      
    
    

    I think you are working with an XSLT 1.0 processor, whereas replace() is a function that has been introduced with XSLT/XPath 2.0.

提交回复
热议问题