How to implement Carriage return in XSLT

后端 未结 10 1328
甜味超标
甜味超标 2020-12-28 15:18

I want to implement carriage return within xslt. The problem is I have a varible: Step 1 = Value 1 breaktag Step 2 = Value 2 as a string and would like to appear as

10条回答
  •  时光取名叫无心
    2020-12-28 16:14

    Here is an approach that uses a recursive template, which looks for in the string from the database and then outputs the substring before. If there is a substring after remaining, then the template calls itself until there is nothing left. In case is not present then the text is simply output.

    Here is the template call (just replace @ActivityExtDescription with your database field):

    
        
    
    

    and here is the code for the template itself:

    
    
    
        
            
                
            
            
                
            
    
            
                

    Works like a charm!!!

提交回复
热议问题